mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 04:08:55 +00:00
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:
parent
07fd17445c
commit
83c5446d85
23 changed files with 86 additions and 54 deletions
|
@ -7,12 +7,11 @@
|
|||
|
||||
namespace Common
|
||||
{
|
||||
// Git version number
|
||||
extern const std::string scm_desc_str;
|
||||
extern const std::string scm_branch_str;
|
||||
extern const std::string scm_rev_str;
|
||||
extern const std::string scm_rev_git_str;
|
||||
extern const std::string scm_distributor_str;
|
||||
extern const std::string scm_update_track_str;
|
||||
extern const std::string netplay_dolphin_ver;
|
||||
const std::string& GetScmDescStr();
|
||||
const std::string& GetScmBranchStr();
|
||||
const std::string& GetScmRevStr();
|
||||
const std::string& GetScmRevGitStr();
|
||||
const std::string& GetScmDistributorStr();
|
||||
const std::string& GetScmUpdateTrackStr();
|
||||
const std::string& GetNetplayDolphinVer();
|
||||
} // namespace Common
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue