1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +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

@@ -40,8 +40,8 @@ Vector<String> EditorFolding::_get_unfolds(const Object *p_object) {
if (sections.size()) {
String *w = sections.ptrw();
int idx = 0;
for (const RBSet<String>::Element *E = p_object->editor_get_section_folding().front(); E; E = E->next()) {
w[idx++] = E->get();
for (const String &E : p_object->editor_get_section_folding()) {
w[idx++] = E;
}
}
@@ -270,8 +270,8 @@ void EditorFolding::_do_object_unfolds(Object *p_object, RBSet<Ref<Resource>> &r
}
}
for (RBSet<String>::Element *E = unfold_group.front(); E; E = E->next()) {
p_object->editor_set_section_unfold(E->get(), true);
for (const String &E : unfold_group) {
p_object->editor_set_section_unfold(E, true);
}
}