Fix static initialisation order fiasco issue for Version variables
Fixes a crash that could occur if the static constructor function for the MainSettings.cpp TU happened to run before the variables in Common/Version.cpp are initialised. (This is known as the static initialisation order fiasco.) By using wrapper functions, those variables are now guaranteed to be constructed on first use.
This commit is contained in:
23 files changed
+86
-54
No files matched your search
@@ -982,7 +982,7 @@ void UpdateTitle(u32 ElapseTime)
|
||||
}
|
||||
}
|
||||
|
||||
std::string message = fmt::format("{} | {} | {}", Common::scm_rev_str, SSettings, SFPS);
|
||||
std::string message = fmt::format("{} | {} | {}", Common::GetScmRevStr(), SSettings, SFPS);
|
||||
if (Config::Get(Config::MAIN_SHOW_ACTIVE_TITLE))
|
||||
{
|
||||
const std::string& title = SConfig::GetInstance().GetTitleDescription();
|
||||
|
||||
Reference in new issue
Block a user