diff options
Diffstat (limited to 'core/object/script_language.h')
-rw-r--r-- | core/object/script_language.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/object/script_language.h b/core/object/script_language.h index 829f01fbcc..2b685c77a3 100644 --- a/core/object/script_language.h +++ b/core/object/script_language.h @@ -35,6 +35,7 @@ #include "core/io/resource.h" #include "core/templates/pair.h" #include "core/templates/rb_map.h" +#include "core/templates/safe_refcount.h" #include "core/variant/typed_array.h" class ScriptLanguage; @@ -52,7 +53,7 @@ class ScriptServer { static int _language_count; static bool scripting_enabled; static bool reload_scripts_on_save; - static bool languages_finished; + static SafeFlag languages_finished; // Used until GH-76581 is fixed properly. struct GlobalScriptClass { StringName language; @@ -97,7 +98,7 @@ public: static void init_languages(); static void finish_languages(); - static bool are_languages_finished() { return languages_finished; } + static bool are_languages_finished() { return languages_finished.is_set(); } }; class ScriptInstance; @@ -338,7 +339,7 @@ public: Ref<Resource> icon; Variant default_value; Vector<Pair<int, int>> matches; - Vector<Pair<int, int>> last_matches; + Vector<Pair<int, int>> last_matches = { { -1, -1 } }; // This value correspond to an impossible match int location = LOCATION_OTHER; CodeCompletionOption() {} |