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

@@ -85,8 +85,8 @@ public:
void update_end() { //call after updating dependencies
List<Pair<Dependency *, DependencyTracker *>> to_clean_up;
for (RBSet<Dependency *>::Element *E = dependencies.front(); E; E = E->next()) {
Dependency *dep = E->get();
for (Dependency *E : dependencies) {
Dependency *dep = E;
HashMap<DependencyTracker *, uint32_t>::Iterator F = dep->instances.find(this);
ERR_CONTINUE(!F);
if (F->value != instance_version) {
@@ -105,8 +105,8 @@ public:
}
void clear() { // clear all dependencies
for (RBSet<Dependency *>::Element *E = dependencies.front(); E; E = E->next()) {
Dependency *dep = E->get();
for (Dependency *E : dependencies) {
Dependency *dep = E;
dep->instances.erase(this);
}
dependencies.clear();