diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-09-12 12:55:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-12 12:55:53 +0200 |
commit | aabbd00284640a4789f96702c134ea40b11b402e (patch) | |
tree | 8363659a6551644b0d89401681e2909d5451a119 /scene | |
parent | c5e0e31f5106d7d91dc478af1f86740c74cea824 (diff) | |
parent | b2a38854fdde296fd2d7da139a29b23a18ab494d (diff) |
Merge pull request #10908 from hpvb/fix-unused-variables
Fix unused variable warnings
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 c2b5283b9c..66364d40f9 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 d4ebf55f92..db282262ec 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 d3a0857b16..a30fc03aa9 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 e1ad9e4cb0..2e89a739bd 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)); |