summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-10-03 19:05:55 +0200
committerGitHub <noreply@github.com>2018-10-03 19:05:55 +0200
commit344a453bb8905f7c6f8f05d54469955eed9b2818 (patch)
tree16bc812a9cfdf62b9a496103e86e2707263941c6 /scene
parent1aa1398012b9132a26ffe6aa4cc9d4dde984b409 (diff)
parentdec20a987b40e7625b38e520cc223723da9bae2a (diff)
Merge pull request #22681 from akien-mga/fix-warnings
Fix warnings on release builds and some MSVC warnings
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/graph_edit.cpp2
-rw-r--r--scene/main/node.cpp3
-rw-r--r--scene/resources/material.h4
3 files changed, 5 insertions, 4 deletions
diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp
index 0ffaac20f6..b4fd7484e9 100644
--- a/scene/gui/graph_edit.cpp
+++ b/scene/gui/graph_edit.cpp
@@ -1042,7 +1042,7 @@ void GraphEdit::set_connection_activity(const StringName &p_from, int p_from_por
if (E->get().from == p_from && E->get().from_port == p_from_port && E->get().to == p_to && E->get().to_port == p_to_port) {
- if (ABS(E->get().activity != p_activity)) {
+ if (ABS(E->get().activity - p_activity) < CMP_EPSILON) {
//update only if changed
top_layer->update();
connections_layer->update();
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index 47ffbe2ff3..8fd7dc1d7b 100644
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -2488,6 +2488,7 @@ void Node::_set_tree(SceneTree *p_tree) {
tree_changed_b->tree_changed();
}
+#ifdef DEBUG_ENABLED
static void _Node_debug_sn(Object *p_obj) {
Node *n = Object::cast_to<Node>(p_obj);
@@ -2509,6 +2510,7 @@ static void _Node_debug_sn(Object *p_obj) {
path = String(p->get_name()) + "/" + p->get_path_to(n);
print_line(itos(p_obj->get_instance_id()) + " - Stray Node: " + path + " (Type: " + n->get_class() + ")");
}
+#endif // DEBUG_ENABLED
void Node::_print_stray_nodes() {
@@ -2518,7 +2520,6 @@ void Node::_print_stray_nodes() {
void Node::print_stray_nodes() {
#ifdef DEBUG_ENABLED
-
ObjectDB::debug_objects(_Node_debug_sn);
#endif
}
diff --git a/scene/resources/material.h b/scene/resources/material.h
index 0154874ae4..cf4d19b5a7 100644
--- a/scene/resources/material.h
+++ b/scene/resources/material.h
@@ -286,7 +286,7 @@ private:
mk.key = 0;
for (int i = 0; i < FEATURE_MAX; i++) {
if (features[i]) {
- mk.feature_mask |= (1 << i);
+ mk.feature_mask |= ((uint64_t)1 << i);
}
}
mk.detail_uv = detail_uv;
@@ -295,7 +295,7 @@ private:
mk.cull_mode = cull_mode;
for (int i = 0; i < FLAG_MAX; i++) {
if (flags[i]) {
- mk.flags |= (1 << i);
+ mk.flags |= ((uint64_t)1 << i);
}
}
mk.detail_blend_mode = detail_blend_mode;