mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-13 02:08:49 +12:00
ID manager simplified
ID manager refactoring, redundant "type" information removed
This commit is contained in:
parent
da8883d5d3
commit
dd665e7363
67 changed files with 762 additions and 941 deletions
19
rpcs3/Emu/IdManager.cpp
Normal file
19
rpcs3/Emu/IdManager.cpp
Normal file
|
@ -0,0 +1,19 @@
|
|||
#include "stdafx.h"
|
||||
#include "IdManager.h"
|
||||
|
||||
namespace idm
|
||||
{
|
||||
std::mutex g_id_mutex;
|
||||
|
||||
std::unordered_map<u32, ID_data_t> g_id_map;
|
||||
|
||||
u32 g_cur_id = 1;
|
||||
|
||||
void clear()
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(g_id_mutex);
|
||||
|
||||
g_id_map.clear();
|
||||
g_cur_id = 1; // first ID
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue