summaryrefslogtreecommitdiff
path: root/tools/editor
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2016-07-07 09:20:02 +0200
committerRémi Verschelde <rverschelde@gmail.com>2016-07-07 23:16:21 +0200
commit454b210242ec15a9928324757f27989216bc5a59 (patch)
tree7e028a2da14765378e5eee7f71b434bde5038705 /tools/editor
parent3fcb9b1ec179b99d979d4cfea9b5e3c80e4a3e33 (diff)
Remove unused variables (third pass) + dead code
Fixes various gcc 5.4.0 warnings for -Wunused-variable and -Wunused-but-set-variable
Diffstat (limited to 'tools/editor')
-rw-r--r--tools/editor/io_plugins/editor_atlas.cpp6
-rw-r--r--tools/editor/io_plugins/editor_import_collada.cpp6
-rw-r--r--tools/editor/io_plugins/editor_scene_import_plugin.cpp10
-rw-r--r--tools/editor/io_plugins/editor_texture_import_plugin.cpp4
-rw-r--r--tools/editor/io_plugins/editor_translation_import_plugin.cpp2
5 files changed, 2 insertions, 26 deletions
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<Size2i>& p_rects,Vector<Point2i>& r_result, S
//place them
int ofs=0;
- int limit_h=0;
for(int j=0;j<wrects.size();j++) {
@@ -106,8 +105,6 @@ void EditorAtlas::fit(const Vector<Size2i>& p_rects,Vector<Point2i>& 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<wrects[j].s.width;k++) {
@@ -120,8 +117,7 @@ void EditorAtlas::fit(const Vector<Size2i>& p_rects,Vector<Point2i>& 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<Mesh>,Ref<Shape> > collision_map;
- Ref<ResourceImportMetadata> imd = memnew(ResourceImportMetadata);
-
Map< Ref<ImageTexture>,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<ResourceImportMetadata> 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<Resourc
}
ep.step(TTR("Converting Images"),sources.size());
- int base_index=0;
-
Map<uint64_t,int> source_md5;
Map<int,List<int> > source_map;
@@ -1760,7 +1758,6 @@ void EditorTextureImportPlugin::reimport_multiple_files(const Vector<String>& p_
Vector<String> valid;
- bool warning=false;
for(int i=0;i<p_list.size();i++) {
Ref<ResourceImportMetadata> rimd = ResourceLoader::load_import_metadata(p_list[i]);
@@ -1768,7 +1765,6 @@ void EditorTextureImportPlugin::reimport_multiple_files(const Vector<String>& 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 Ref<Reso
ERR_FAIL_COND_V( !f, ERR_INVALID_PARAMETER );
- bool first=false;
bool skip_first = from->get_option("skip_first");
int index = from->get_option("index");
index+=1;
@@ -439,7 +438,6 @@ Error EditorTranslationImportPlugin::import(const String& p_path, const Ref<Reso
while(line.size()>1) {
-
if (!skip_first) {
ERR_FAIL_INDEX_V(index,line.size(),ERR_INVALID_DATA );
translation->add_message(line[0].strip_edges(),line[index]);