You've already forked godot
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:
@@ -317,8 +317,8 @@ void Resource::unregister_owner(Object *p_owner) {
|
||||
}
|
||||
|
||||
void Resource::notify_change_to_owners() {
|
||||
for (RBSet<ObjectID>::Element *E = owners.front(); E; E = E->next()) {
|
||||
Object *obj = ObjectDB::get_instance(E->get());
|
||||
for (const ObjectID &E : owners) {
|
||||
Object *obj = ObjectDB::get_instance(E);
|
||||
ERR_CONTINUE_MSG(!obj, "Object was deleted, while still owning a resource."); //wtf
|
||||
//TODO store string
|
||||
obj->call("resource_changed", Ref<Resource>(this));
|
||||
|
||||
Reference in New Issue
Block a user