diff options
author | Thaer Razeq <RebelliousX@gmail.com> | 2017-02-23 02:28:09 -0600 |
---|---|---|
committer | REBELLIOUSX\Rebel_X <RebelliousX@gmail.com> | 2017-02-28 07:52:02 -0600 |
commit | f50488a36188d5975bfa8554687a1acdd394d6a9 (patch) | |
tree | 3b8712b9162aeb30e8eaaeeca63e6d04c7b9e3b5 /tools/editor/collada | |
parent | 0f8c6dd3822c38b8145f08265abb9eba479f4d15 (diff) |
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/collada')
-rw-r--r-- | tools/editor/collada/collada.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/editor/collada/collada.cpp b/tools/editor/collada/collada.cpp index a23fd84aa0..2ba4f648a3 100644 --- a/tools/editor/collada/collada.cpp +++ b/tools/editor/collada/collada.cpp @@ -352,7 +352,7 @@ void Collada::_parse_image(XMLParser& parser) { image.path=path; - } if (name=="data") { + } else if (name=="data") { ERR_PRINT("COLLADA Embedded image data not supported!"); @@ -728,7 +728,7 @@ void Collada::_parse_effect_material(XMLParser& parser,Effect &effect,String &id #endif } - } if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && ( + } else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && ( parser.get_node_name()=="constant" || parser.get_node_name()=="lambert" || parser.get_node_name()=="phong" || @@ -1100,7 +1100,7 @@ void Collada::_parse_mesh_geometry(XMLParser& parser,String p_id,String p_name) current_source=id; COLLADA_PRINT("source data: "+id); - } else if (section=="float_array" || section=="array" || section=="float_array") { + } else if (section=="float_array" || section=="array") { // create a new array and read it. if (meshdata.sources.has(current_source)) { @@ -2192,7 +2192,7 @@ void Collada::_parse_scene(XMLParser& parser) { state.root_visual_scene=_uri_to_id(parser.get_attribute_value("url")); print_line("***ROOT VISUAL SCENE: "+state.root_visual_scene); - } if (name=="instance_physics_scene") { + } else if (name=="instance_physics_scene") { state.root_physics_scene=_uri_to_id(parser.get_attribute_value("url")); |