From 454b210242ec15a9928324757f27989216bc5a59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Thu, 7 Jul 2016 09:20:02 +0200 Subject: Remove unused variables (third pass) + dead code Fixes various gcc 5.4.0 warnings for -Wunused-variable and -Wunused-but-set-variable --- tools/editor/io_plugins/editor_atlas.cpp | 6 +----- tools/editor/io_plugins/editor_import_collada.cpp | 6 ------ tools/editor/io_plugins/editor_scene_import_plugin.cpp | 10 +--------- tools/editor/io_plugins/editor_texture_import_plugin.cpp | 4 ---- tools/editor/io_plugins/editor_translation_import_plugin.cpp | 2 -- 5 files changed, 2 insertions(+), 26 deletions(-) (limited to 'tools/editor') diff --git a/tools/editor/io_plugins/editor_atlas.cpp b/tools/editor/io_plugins/editor_atlas.cpp index f894e7e8b2..f69e383fb0 100644 --- a/tools/editor/io_plugins/editor_atlas.cpp +++ b/tools/editor/io_plugins/editor_atlas.cpp @@ -82,7 +82,6 @@ void EditorAtlas::fit(const Vector& p_rects,Vector& r_result, S //place them int ofs=0; - int limit_h=0; for(int j=0;j& p_rects,Vector& r_result, S int end_h = from_y+wrects[j].s.height; int end_w = ofs+wrects[j].s.width; - if (ofs==0) - limit_h=end_h; for(int k=0;k& p_rects,Vector& r_result, S if (end_w > max_w) max_w=end_w; - //if (ofs==0 || end_h>limit_h ) //while h limit not reched, keep stacking - ofs+=wrects[j].s.width; + ofs+=wrects[j].s.width; } diff --git a/tools/editor/io_plugins/editor_import_collada.cpp b/tools/editor/io_plugins/editor_import_collada.cpp index 363cba3678..fc45b51a98 100644 --- a/tools/editor/io_plugins/editor_import_collada.cpp +++ b/tools/editor/io_plugins/editor_import_collada.cpp @@ -2278,12 +2278,6 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones NodeMap &nm = node_map[at.target]; String path = scene->get_path_to(nm.node); - Collada::Node *cn = collada.state.scene_map[at.target]; - //if (cn->ignore_anim) { - // print_line("warning, ignoring property animation on node: "+nm.path); - //continue; - //} - animation->add_track(Animation::TYPE_VALUE); int track = animation->get_track_count() -1; diff --git a/tools/editor/io_plugins/editor_scene_import_plugin.cpp b/tools/editor/io_plugins/editor_scene_import_plugin.cpp index 8899d65aea..e24412d4ef 100644 --- a/tools/editor/io_plugins/editor_scene_import_plugin.cpp +++ b/tools/editor/io_plugins/editor_scene_import_plugin.cpp @@ -2680,12 +2680,6 @@ Error EditorSceneImportPlugin::import2(Node *scene, const String& p_dest_path, c progress.step(TTR("Importing Scene.."),2); - bool reimport = bool(from->get_option("reimport")); - int this_time_action = from->get_option("import_this_time"); - int next_time_action = from->get_option("import_next_time"); - - int import_action = reimport?this_time_action:next_time_action; - from->set_source_md5(0,FileAccess::get_md5(src_path)); from->set_editor(get_name()); @@ -2694,8 +2688,6 @@ Error EditorSceneImportPlugin::import2(Node *scene, const String& p_dest_path, c Map,Ref > collision_map; - Ref imd = memnew(ResourceImportMetadata); - Map< Ref,TextureRole > imagemap; scene=_fix_node(scene,scene,collision_map,scene_flags,imagemap); @@ -2811,7 +2803,7 @@ Error EditorSceneImportPlugin::import2(Node *scene, const String& p_dest_path, c target_path=target_path.basename()+".tex"; Ref imd = memnew( ResourceImportMetadata ); - print_line("flags: "+itos(image_flags)); + uint32_t flags = image_flags; if (E->get()==TEXTURE_ROLE_DIFFUSE && scene_flags&SCENE_FLAG_LINEARIZE_DIFFUSE_TEXTURES) flags|=EditorTextureImportPlugin::IMAGE_FLAG_CONVERT_TO_LINEAR; diff --git a/tools/editor/io_plugins/editor_texture_import_plugin.cpp b/tools/editor/io_plugins/editor_texture_import_plugin.cpp index 16ea803da4..1d8319d460 100644 --- a/tools/editor/io_plugins/editor_texture_import_plugin.cpp +++ b/tools/editor/io_plugins/editor_texture_import_plugin.cpp @@ -1192,8 +1192,6 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref source_md5; Map > source_map; @@ -1760,7 +1758,6 @@ void EditorTextureImportPlugin::reimport_multiple_files(const Vector& p_ Vector valid; - bool warning=false; for(int i=0;i rimd = ResourceLoader::load_import_metadata(p_list[i]); @@ -1768,7 +1765,6 @@ void EditorTextureImportPlugin::reimport_multiple_files(const Vector& p_ if (type=="texture" || type.begins_with("texture_")) { if ((rimd->has_option("atlas") && rimd->get_option("atlas")) || (rimd->has_option("large") && rimd->get_option("large"))) { - warning=true; continue; } diff --git a/tools/editor/io_plugins/editor_translation_import_plugin.cpp b/tools/editor/io_plugins/editor_translation_import_plugin.cpp index aa36fefdb7..9ee3e98486 100644 --- a/tools/editor/io_plugins/editor_translation_import_plugin.cpp +++ b/tools/editor/io_plugins/editor_translation_import_plugin.cpp @@ -425,7 +425,6 @@ Error EditorTranslationImportPlugin::import(const String& p_path, const Refget_option("skip_first"); int index = from->get_option("index"); index+=1; @@ -439,7 +438,6 @@ Error EditorTranslationImportPlugin::import(const String& p_path, const Ref1) { - if (!skip_first) { ERR_FAIL_INDEX_V(index,line.size(),ERR_INVALID_DATA ); translation->add_message(line[0].strip_edges(),line[index]); -- cgit v1.2.3