From 3fcb9b1ec179b99d979d4cfea9b5e3c80e4a3e33 Mon Sep 17 00:00:00 2001 From: Rémi Verschelde Date: Wed, 6 Jul 2016 19:04:21 +0200 Subject: Removed unused variables (second pass) + dead code Fixes various gcc 5.4.0 warnings for -Wunused-variable and -Wunused-but-set-variable --- tools/editor/editor_node.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'tools/editor/editor_node.cpp') diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index 56d745dee..0233b6e9d 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -597,7 +597,6 @@ void EditorNode::save_resource(const Ref& p_resource) { void EditorNode::save_resource_as(const Ref& p_resource,const String& p_at_path) { file->set_mode(EditorFileDialog::MODE_SAVE_FILE); - bool relpaths = (p_resource->has_meta("__editor_relpaths__") && p_resource->get_meta("__editor_relpaths__").operator bool()); current_option=RESOURCE_SAVE_AS; List extensions; @@ -1551,9 +1550,10 @@ void EditorNode::_property_editor_back() { void EditorNode::_imported(Node *p_node) { - Node *scene = editor_data.get_edited_scene_root(); -// add_edited_scene(p_node); /* + Node *scene = editor_data.get_edited_scene_root(); + add_edited_scene(p_node); + if (scene) { String path = scene->get_filename(); p_node->set_filename(path); @@ -2129,7 +2129,6 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { } file->set_mode(EditorFileDialog::MODE_SAVE_FILE); - bool relpaths = (scene->has_meta("__editor_relpaths__") && scene->get_meta("__editor_relpaths__").operator bool()); List extensions; @@ -2210,8 +2209,6 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { } - bool relpaths = (scene->has_meta("__editor_relpaths__") && scene->get_meta("__editor_relpaths__").operator bool()); - file->set_mode(EditorFileDialog::MODE_SAVE_FILE); file->set_current_path(cpath); @@ -2220,8 +2217,8 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { } break; case FILE_SAVE_OPTIMIZED: { - Node *scene = editor_data.get_edited_scene_root(); #if 0 + Node *scene = editor_data.get_edited_scene_root(); if (!scene) { current_option=-1; @@ -5644,8 +5641,6 @@ EditorNode::EditorNode() { ED_SHORTCUT("editor/prev_tab", TTR("Previous tab"), KEY_MASK_CMD+KEY_MASK_SHIFT+KEY_TAB); - Separator *vs=NULL; - file_menu->set_tooltip(TTR("Operations with scene files.")); p=file_menu->get_popup(); p->add_shortcut(ED_SHORTCUT("editor/new_scene",TTR("New Scene")),FILE_NEW_SCENE); -- cgit v1.2.3-70-g09d2