mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-16 03:38:38 +12:00
fix order of static initialization: add comment
This commit is contained in:
parent
b5b8f7c35a
commit
bbd308a908
1 changed files with 2 additions and 0 deletions
|
@ -39,6 +39,8 @@ extern void sys_initialize_tls(ppu_thread&, u64, u32, u32, u32);
|
||||||
|
|
||||||
std::unordered_map<std::string, ppu_static_module*>& ppu_module_manager::get()
|
std::unordered_map<std::string, ppu_static_module*>& ppu_module_manager::get()
|
||||||
{
|
{
|
||||||
|
// In C++ the order of static initialization is undefined if it happens in
|
||||||
|
// separate compilation units, therefore we have to initialize the map on first use.
|
||||||
static std::unordered_map<std::string, ppu_static_module*> s_module_map;
|
static std::unordered_map<std::string, ppu_static_module*> s_module_map;
|
||||||
return s_module_map;
|
return s_module_map;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue