summaryrefslogtreecommitdiff
path: root/core/object/script_language.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/object/script_language.cpp')
-rw-r--r--core/object/script_language.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/object/script_language.cpp b/core/object/script_language.cpp
index a5d25bf533..c1036e3413 100644
--- a/core/object/script_language.cpp
+++ b/core/object/script_language.cpp
@@ -253,10 +253,9 @@ StringName ScriptServer::get_global_class_native_base(const String &p_class) {
}
void ScriptServer::get_global_class_list(List<StringName> *r_global_classes) {
- const StringName *K = nullptr;
List<StringName> classes;
- while ((K = global_classes.next(K))) {
- classes.push_back(*K);
+ for (const KeyValue<StringName, GlobalScriptClass> &E : global_classes) {
+ classes.push_back(E.key);
}
classes.sort_custom<StringName::AlphCompare>();
for (const StringName &E : classes) {