diff options
author | qarmin <mikrutrafal54@gmail.com> | 2019-06-26 15:08:25 +0200 |
---|---|---|
committer | qarmin <mikrutrafal54@gmail.com> | 2019-06-26 15:08:25 +0200 |
commit | 4e5310cc60dc17e5ef09e57115ca8236544679e4 (patch) | |
tree | 894c5070a709198ed994db7c7d0c0e124abbc9e5 /editor/collada | |
parent | 5c66771e3ebccdfec55bb94ea521d2f24cb6200a (diff) |
Some code changed with Clang-Tidy
Diffstat (limited to 'editor/collada')
-rw-r--r-- | editor/collada/collada.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/collada/collada.cpp b/editor/collada/collada.cpp index a0d319c81b..4bc9dff26c 100644 --- a/editor/collada/collada.cpp +++ b/editor/collada/collada.cpp @@ -48,7 +48,7 @@ String Collada::Effect::get_texture_path(const String &p_source, Collada &state) const { - String image = p_source; + const String &image = p_source; ERR_FAIL_COND_V(!state.state.image_map.has(image), ""); return state.state.image_map[image].path; } @@ -1101,6 +1101,7 @@ void Collada::_parse_mesh_geometry(XMLParser &parser, String p_id, String p_name Vector<float> values = _read_float_array(parser); if (polygons) { + ERR_CONTINUE(prim.vertex_size == 0); prim.polygons.push_back(values.size() / prim.vertex_size); int from = prim.indices.size(); prim.indices.resize(from + values.size()); @@ -2522,7 +2523,6 @@ Error Collada::load(const String &p_path, int p_flags) { state.local_path = ProjectSettings::get_singleton()->localize_path(p_path); state.import_flags = p_flags; /* Skip headers */ - err = OK; while ((err = parser.read()) == OK) { if (parser.get_node_type() == XMLParser::NODE_ELEMENT) { |