diff options
author | Hein-Pieter van Braam <hp@tmm.cx> | 2017-09-02 22:32:31 +0200 |
---|---|---|
committer | Hein-Pieter van Braam <hp@tmm.cx> | 2017-09-08 15:03:53 +0200 |
commit | b2a38854fdde296fd2d7da139a29b23a18ab494d (patch) | |
tree | 951326f4d966e01d4f8d4402dc7beb2252560b7a /scene | |
parent | d1cb73b47a17de830d9474026ffa7b3587cfbc68 (diff) |
Fix unused variable warnings
The forth in my quest to make Godot 3.x compile with -Werror on GCC7
Diffstat (limited to 'scene')
-rw-r--r-- | scene/2d/canvas_item.cpp | 1 | ||||
-rw-r--r-- | scene/3d/gi_probe.cpp | 16 | ||||
-rw-r--r-- | scene/3d/spatial.cpp | 2 | ||||
-rw-r--r-- | scene/gui/tree.cpp | 2 | ||||
-rwxr-xr-x | scene/main/node.cpp | 5 | ||||
-rw-r--r-- | scene/main/scene_tree.cpp | 1 | ||||
-rw-r--r-- | scene/resources/curve.cpp | 9 |
7 files changed, 1 insertions, 35 deletions
diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp index a7c5d1adbb..ec1ea7df38 100644 --- a/scene/2d/canvas_item.cpp +++ b/scene/2d/canvas_item.cpp @@ -338,7 +338,6 @@ void CanvasItem::_update_callback() { notification(NOTIFICATION_DRAW); emit_signal(SceneStringNames::get_singleton()->draw); if (get_script_instance()) { - Variant::CallError err; get_script_instance()->call_multilevel_reversed(SceneStringNames::get_singleton()->_draw, NULL, 0); } drawing = false; diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp index 7792a86b4a..444036de3a 100644 --- a/scene/3d/gi_probe.cpp +++ b/scene/3d/gi_probe.cpp @@ -696,22 +696,6 @@ void GIProbe::_plot_face(int p_idx, int p_level, int p_x, int p_y, int p_z, cons p_baker->bake_cells[p_idx].normal[2] += normal_accum.z; p_baker->bake_cells[p_idx].alpha += alpha; - static const Vector3 side_normals[6] = { - Vector3(-1, 0, 0), - Vector3(1, 0, 0), - Vector3(0, -1, 0), - Vector3(0, 1, 0), - Vector3(0, 0, -1), - Vector3(0, 0, 1), - }; - - /* - for(int i=0;i<6;i++) { - if (normal.dot(side_normals[i])>CMP_EPSILON) { - p_baker->bake_cells[p_idx].used_sides|=(1<<i); - } - }*/ - } else { //go down diff --git a/scene/3d/spatial.cpp b/scene/3d/spatial.cpp index 7db3bb18bd..91fe426b99 100644 --- a/scene/3d/spatial.cpp +++ b/scene/3d/spatial.cpp @@ -175,7 +175,6 @@ void Spatial::_notification(int p_what) { if (get_script_instance()) { - Variant::CallError err; get_script_instance()->call_multilevel(SceneStringNames::get_singleton()->_enter_world, NULL, 0); } #ifdef TOOLS_ENABLED @@ -207,7 +206,6 @@ void Spatial::_notification(int p_what) { if (get_script_instance()) { - Variant::CallError err; get_script_instance()->call_multilevel(SceneStringNames::get_singleton()->_exit_world, NULL, 0); } diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index de17416d8e..badcce78c2 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -2478,7 +2478,7 @@ void Tree::_gui_input(Ref<InputEvent> p_event) { pressing_for_editor = false; blocked++; - bool handled = propagate_mouse_event(pos + cache.offset, 0, 0, b->is_doubleclick(), root, b->get_button_index(), b); + propagate_mouse_event(pos + cache.offset, 0, 0, b->is_doubleclick(), root, b->get_button_index(), b); blocked--; if (pressing_for_editor) { diff --git a/scene/main/node.cpp b/scene/main/node.cpp index c3d9d97c5a..c484220162 100755 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -50,7 +50,6 @@ void Node::_notification(int p_notification) { Variant time = get_process_delta_time(); const Variant *ptr[1] = { &time }; - Variant::CallError err; get_script_instance()->call_multilevel(SceneStringNames::get_singleton()->_process, ptr, 1); } } break; @@ -60,7 +59,6 @@ void Node::_notification(int p_notification) { Variant time = get_fixed_process_delta_time(); const Variant *ptr[1] = { &time }; - Variant::CallError err; get_script_instance()->call_multilevel(SceneStringNames::get_singleton()->_fixed_process, ptr, 1); } @@ -134,7 +132,6 @@ void Node::_notification(int p_notification) { set_fixed_process(true); } - Variant::CallError err; get_script_instance()->call_multilevel_reversed(SceneStringNames::get_singleton()->_ready, NULL, 0); } //emit_signal(SceneStringNames::get_singleton()->enter_tree); @@ -209,7 +206,6 @@ void Node::_propagate_enter_tree() { if (get_script_instance()) { - Variant::CallError err; get_script_instance()->call_multilevel_reversed(SceneStringNames::get_singleton()->_enter_tree, NULL, 0); } @@ -273,7 +269,6 @@ void Node::_propagate_exit_tree() { if (get_script_instance()) { - Variant::CallError err; get_script_instance()->call_multilevel(SceneStringNames::get_singleton()->_exit_tree, NULL, 0); } emit_signal(SceneStringNames::get_singleton()->tree_exited); diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index a71b491bae..4f62d88934 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -870,7 +870,6 @@ void SceneTree::_call_input_pause(const StringName &p_group, const StringName &p if (!n->can_process()) continue; - Variant::CallError ce; n->call_multilevel(p_method, (const Variant **)v, 1); //ERR_FAIL_COND(node_count != g.nodes.size()); } diff --git a/scene/resources/curve.cpp b/scene/resources/curve.cpp index 7fbaa1f73c..ab998a9ab8 100644 --- a/scene/resources/curve.cpp +++ b/scene/resources/curve.cpp @@ -84,15 +84,6 @@ int Curve::add_point(Vector2 p_pos, real_t left_tangent, real_t right_tangent, T int i = get_index(p_pos.x); - int nearest_index = i; - if (i + 1 < _points.size()) { - real_t diff0 = p_pos.x - _points[i].pos.x; - real_t diff1 = _points[i + 1].pos.x - p_pos.x; - - if (diff1 < diff0) - nearest_index = i + 1; - } - if (i == 0 && p_pos.x < _points[0].pos.x) { // Insert before anything else _points.insert(0, Point(p_pos, left_tangent, right_tangent, left_mode, right_mode)); |