summaryrefslogtreecommitdiff
path: root/scene/main/resource_preloader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/main/resource_preloader.cpp')
-rw-r--r--scene/main/resource_preloader.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/scene/main/resource_preloader.cpp b/scene/main/resource_preloader.cpp
index cd9560db61..c44b55284d 100644
--- a/scene/main/resource_preloader.cpp
+++ b/scene/main/resource_preloader.cpp
@@ -57,8 +57,8 @@ Array ResourcePreloader::_get_resources() const {
Set<String> sorted_names;
- for (Map<StringName, RES>::Element *E = resources.front(); E; E = E->next()) {
- sorted_names.insert(E->key());
+ for (const KeyValue<StringName, RES> &E : resources) {
+ sorted_names.insert(E.key);
}
int i = 0;
@@ -131,8 +131,8 @@ Vector<String> ResourcePreloader::_get_resource_list() const {
}
void ResourcePreloader::get_resource_list(List<StringName> *p_list) {
- for (Map<StringName, RES>::Element *E = resources.front(); E; E = E->next()) {
- p_list->push_back(E->key());
+ for (const KeyValue<StringName, RES> &E : resources) {
+ p_list->push_back(E.key);
}
}
@@ -147,7 +147,7 @@ void ResourcePreloader::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_resource", "name"), &ResourcePreloader::get_resource);
ClassDB::bind_method(D_METHOD("get_resource_list"), &ResourcePreloader::_get_resource_list);
- ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "resources", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_resources", "_get_resources");
+ ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "resources", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL), "_set_resources", "_get_resources");
}
ResourcePreloader::ResourcePreloader() {