aboutsummaryrefslogtreecommitdiff
path: root/tools/editor/import
diff options
context:
space:
mode:
authorThaer Razeq2017-02-23 02:28:09 -0600
committerREBELLIOUSX\Rebel_X2017-02-28 07:52:02 -0600
commitf50488a36188d5975bfa8554687a1acdd394d6a9 (patch)
tree3b8712b9162aeb30e8eaaeeca63e6d04c7b9e3b5 /tools/editor/import
parent0f8c6dd3822c38b8145f08265abb9eba479f4d15 (diff)
downloadgodot-f50488a36188d5975bfa8554687a1acdd394d6a9.tar.gz
godot-f50488a36188d5975bfa8554687a1acdd394d6a9.tar.zst
godot-f50488a36188d5975bfa8554687a1acdd394d6a9.zip
Various fixes detected using PVS-Studio static analyzer.
- Add FIXME tags comments to some unfixed potential bugs - Remove some checks (always false: unsigned never < 0) - Fix some if statements based on reviews. - Bunch of missing `else` statements
Diffstat (limited to 'tools/editor/import')
-rw-r--r--tools/editor/import/resource_importer_obj.cpp2
-rw-r--r--tools/editor/import/resource_importer_scene.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/tools/editor/import/resource_importer_obj.cpp b/tools/editor/import/resource_importer_obj.cpp
index e6e23366f..aacb5fbb2 100644
--- a/tools/editor/import/resource_importer_obj.cpp
+++ b/tools/editor/import/resource_importer_obj.cpp
@@ -118,7 +118,7 @@ Error ResourceImporterOBJ::import(const String& p_source_file, const String& p_s
nrm.y=v[2].to_float();
nrm.z=v[3].to_float();
normals.push_back(nrm);
- } if (l.begins_with("f ")) {
+ } else if (l.begins_with("f ")) {
//vertex
has_index_data=true;
diff --git a/tools/editor/import/resource_importer_scene.cpp b/tools/editor/import/resource_importer_scene.cpp
index ae840e9e1..406058c59 100644
--- a/tools/editor/import/resource_importer_scene.cpp
+++ b/tools/editor/import/resource_importer_scene.cpp
@@ -1279,7 +1279,7 @@ Error ResourceImporterScene::import(const String& p_source_file, const String& p
Ref<EditorScenePostImport> post_import_script;
if (post_import_script_path!="") {
- post_import_script_path = post_import_script_path;
+ post_import_script_path = post_import_script_path; // FIXME: is there a good reason for this?
Ref<Script> scr = ResourceLoader::load(post_import_script_path);
if (!scr.is_valid()) {
EditorNode::add_io_error(TTR("Couldn't load post-import script:")+" "+post_import_script_path);