summaryrefslogtreecommitdiffstats
path: root/core/string
diff options
context:
space:
mode:
authorThaddeus Crews <repiteo@outlook.com>2024-11-12 12:13:01 -0600
committerThaddeus Crews <repiteo@outlook.com>2024-11-12 12:13:01 -0600
commitebf49317a2557e078c2087c8d133fcfb7a9c7828 (patch)
tree7b92ff002a13c2ab6b29d04b006add6f69837c84 /core/string
parent8e6e59eed89f66a5b79902b1a3d34c98c8b1379f (diff)
parent257633c354fbc8e7b5bc00c9ef5ebcf96bce3e0d (diff)
downloadredot-engine-ebf49317a2557e078c2087c8d133fcfb7a9c7828.tar.gz
Merge pull request #97923 from kisg/translation_server_siof_fix
Make TranslationServer singleton variable inline.
Diffstat (limited to 'core/string')
-rw-r--r--core/string/translation_server.cpp2
-rw-r--r--core/string/translation_server.h2
2 files changed, 1 insertions, 3 deletions
diff --git a/core/string/translation_server.cpp b/core/string/translation_server.cpp
index 4f09360ba8..31c221dad7 100644
--- a/core/string/translation_server.cpp
+++ b/core/string/translation_server.cpp
@@ -411,8 +411,6 @@ StringName TranslationServer::translate_plural(const StringName &p_message, cons
return main_domain->translate_plural(p_message, p_message_plural, p_n, p_context);
}
-TranslationServer *TranslationServer::singleton = nullptr;
-
bool TranslationServer::_load_translations(const String &p_from) {
if (ProjectSettings::get_singleton()->has_setting(p_from)) {
const Vector<String> &translation_names = GLOBAL_GET(p_from);
diff --git a/core/string/translation_server.h b/core/string/translation_server.h
index fac41035ae..bc59c34a38 100644
--- a/core/string/translation_server.h
+++ b/core/string/translation_server.h
@@ -50,7 +50,7 @@ class TranslationServer : public Object {
bool enabled = true;
- static TranslationServer *singleton;
+ static inline TranslationServer *singleton = nullptr;
bool _load_translations(const String &p_from);
String _standardize_locale(const String &p_locale, bool p_add_defaults) const;