diff options
Diffstat (limited to 'core/io')
-rw-r--r-- | core/io/file_access_pack.cpp | 4 | ||||
-rw-r--r-- | core/io/resource.cpp | 4 | ||||
-rw-r--r-- | core/io/resource_loader.cpp | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/core/io/file_access_pack.cpp b/core/io/file_access_pack.cpp index 89efdc4938..595a6e9873 100644 --- a/core/io/file_access_pack.cpp +++ b/core/io/file_access_pack.cpp @@ -406,8 +406,8 @@ Error DirAccessPack::list_dir_begin() { list_dirs.push_back(E.key); } - for (RBSet<String>::Element *E = current->files.front(); E; E = E->next()) { - list_files.push_back(E->get()); + for (const String &E : current->files) { + list_files.push_back(E); } return OK; diff --git a/core/io/resource.cpp b/core/io/resource.cpp index 4a94c17132..ad01eb1083 100644 --- a/core/io/resource.cpp +++ b/core/io/resource.cpp @@ -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)); diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp index 9e6330f34b..fb21db1a19 100644 --- a/core/io/resource_loader.cpp +++ b/core/io/resource_loader.cpp @@ -391,8 +391,8 @@ float ResourceLoader::_dependency_get_progress(const String &p_path) { int dep_count = load_task.sub_tasks.size(); if (dep_count > 0) { float dep_progress = 0; - for (RBSet<String>::Element *E = load_task.sub_tasks.front(); E; E = E->next()) { - dep_progress += _dependency_get_progress(E->get()); + for (const String &E : load_task.sub_tasks) { + dep_progress += _dependency_get_progress(E); } dep_progress /= float(dep_count); dep_progress *= 0.5; |