diff options
author | Aaron Record <aaronjrecord@gmail.com> | 2022-05-18 17:43:40 -0600 |
---|---|---|
committer | Aaron Record <aaronjrecord@gmail.com> | 2022-05-19 12:09:16 +0200 |
commit | 900c676b0282bed83d00834e3c280ac89c2bc94d (patch) | |
tree | b6bf869a55440a666f4bcc17d5e9cd93ff26dbdc /editor/import | |
parent | 71c40ff4da85a4770958533cdc65f2c9f7ddeaff (diff) |
Use range iterators for RBSet in most cases
Diffstat (limited to 'editor/import')
-rw-r--r-- | editor/import/editor_import_collada.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/editor/import/editor_import_collada.cpp b/editor/import/editor_import_collada.cpp index 8ee47cb6f4..03fda0a1c3 100644 --- a/editor/import/editor_import_collada.cpp +++ b/editor/import/editor_import_collada.cpp @@ -875,8 +875,8 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ImporterMesh> &p Vector<Collada::Vertex> vertex_array; //there we go, vertex array vertex_array.resize(vertex_set.size()); - for (RBSet<Collada::Vertex>::Element *F = vertex_set.front(); F; F = F->next()) { - vertex_array.write[F->get().idx] = F->get(); + for (Collada::Vertex &F : vertex_set) { + vertex_array.write[F.idx] = F; } if (has_weights) { @@ -1507,14 +1507,14 @@ void ColladaImport::create_animation(int p_clip, bool p_import_value_tracks) { bool tracks_found = false; - for (RBSet<String>::Element *E = valid_animated_nodes.front(); E; E = E->next()) { + for (const String &E : valid_animated_nodes) { // take snapshots - if (!collada.state.scene_map.has(E->get())) { + if (!collada.state.scene_map.has(E)) { continue; } - NodeMap &nm = node_map[E->get()]; + NodeMap &nm = node_map[E]; String path = scene->get_path_to(nm.node); if (nm.bone >= 0) { @@ -1525,7 +1525,7 @@ void ColladaImport::create_animation(int p_clip, bool p_import_value_tracks) { bool found_anim = false; - Collada::Node *cn = collada.state.scene_map[E->get()]; + Collada::Node *cn = collada.state.scene_map[E]; if (cn->ignore_anim) { continue; } @@ -1665,7 +1665,7 @@ void ColladaImport::create_animation(int p_clip, bool p_import_value_tracks) { if (nm.bone >= 0) { if (found_anim) { - bones_with_animation[E->get()] = true; + bones_with_animation[E] = true; } } |