mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Use range iterators for RBSet in most cases
This commit is contained in:
parent
71c40ff4da
commit
900c676b02
84 changed files with 782 additions and 782 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue