summaryrefslogtreecommitdiffstats
path: root/core/string/translation_server.cpp
diff options
context:
space:
mode:
authorGergely Kis <gergely.kis@migeran.com>2024-10-07 13:38:29 +0200
committerGergely Kis <gergely.kis@migeran.com>2024-10-07 13:47:42 +0200
commit257633c354fbc8e7b5bc00c9ef5ebcf96bce3e0d (patch)
treeb6444c5bc4873a30c795a2e0a73ff388112030c9 /core/string/translation_server.cpp
parentdb66bd35af704fe0d83ba9348b8c50a48e51b2ba (diff)
downloadredot-engine-257633c354fbc8e7b5bc00c9ef5ebcf96bce3e0d.tar.gz
Make TranslationServer singleton variable inline.
This change avoids the problem known as 'Static Initialization Order Fiasco' (SIOF). See the following PR for more explanation: https://github.com/godotengine/godot/pull/94683 Co-authored-by: Gabor Koncz <gabor.koncz@migeran.com>
Diffstat (limited to 'core/string/translation_server.cpp')
-rw-r--r--core/string/translation_server.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/core/string/translation_server.cpp b/core/string/translation_server.cpp
index 89b37d0b8a..d500d225f6 100644
--- a/core/string/translation_server.cpp
+++ b/core/string/translation_server.cpp
@@ -387,8 +387,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);