1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-28 16:07:14 +00:00

Use range iterators for RBSet in most cases

This commit is contained in:
Aaron Record
2022-05-18 17:43:40 -06:00
parent 71c40ff4da
commit 900c676b02
84 changed files with 782 additions and 782 deletions

View File

@@ -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;
}
}