Skip to content

Commit

Permalink
fix order of static initialization: add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
oltolm authored and Nekotekina committed Feb 17, 2023
1 parent b5b8f7c commit bbd308a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rpcs3/Emu/Cell/PPUModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
// 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;
return s_module_map;
}
Expand Down

0 comments on commit bbd308a

Please sign in to comment.