diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-05-19 13:26:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-19 13:26:15 +0200 |
commit | d8093dd27363384c7196dbff7e485f0df2b11894 (patch) | |
tree | b6bf869a55440a666f4bcc17d5e9cd93ff26dbdc /modules/gdscript/gdscript.cpp | |
parent | 71c40ff4da85a4770958533cdc65f2c9f7ddeaff (diff) | |
parent | 900c676b0282bed83d00834e3c280ac89c2bc94d (diff) |
Merge pull request #61173 from LightningAA/update-set-iterators
Diffstat (limited to 'modules/gdscript/gdscript.cpp')
-rw-r--r-- | modules/gdscript/gdscript.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp index e400d0bf94..25f4823d92 100644 --- a/modules/gdscript/gdscript.cpp +++ b/modules/gdscript/gdscript.cpp @@ -764,8 +764,8 @@ bool GDScript::_update_exports(bool *r_err, bool p_recursive_call, PlaceHolderSc _update_exports_values(values, propnames); if (changed) { - for (RBSet<PlaceHolderScriptInstance *>::Element *E = placeholders.front(); E; E = E->next()) { - E->get()->update(propnames, values); + for (PlaceHolderScriptInstance *E : placeholders) { + E->update(propnames, values); } } else { p_instance_to_update->update(propnames, values); @@ -790,8 +790,8 @@ void GDScript::update_exports() { RBSet<ObjectID> copy = inheriters_cache; //might get modified - for (RBSet<ObjectID>::Element *E = copy.front(); E; E = E->next()) { - Object *id = ObjectDB::get_instance(E->get()); + for (const ObjectID &E : copy) { + Object *id = ObjectDB::get_instance(E); GDScript *s = Object::cast_to<GDScript>(id); if (!s) { continue; @@ -939,8 +939,8 @@ void GDScript::get_constants(HashMap<StringName, Variant> *p_constants) { void GDScript::get_members(RBSet<StringName> *p_members) { if (p_members) { - for (RBSet<StringName>::Element *E = members.front(); E; E = E->next()) { - p_members->insert(E->get()); + for (const StringName &E : members) { + p_members->insert(E); } } } |