ID manager simplified

ID manager refactoring, redundant "type" information removed
This commit is contained in:
Nekotekina 2015-08-05 18:30:32 +03:00
parent da8883d5d3
commit dd665e7363
67 changed files with 762 additions and 941 deletions

View file

@ -32,22 +32,22 @@ std::vector<std::shared_ptr<CPUThread>> CPUThreadManager::GetAllThreads()
{
std::vector<std::shared_ptr<CPUThread>> result;
for (auto& t : Emu.GetIdManager().get_all<PPUThread>())
for (auto& t : idm::get_all<PPUThread>())
{
result.emplace_back(t);
}
for (auto& t : Emu.GetIdManager().get_all<SPUThread>())
for (auto& t : idm::get_all<SPUThread>())
{
result.emplace_back(t);
}
for (auto& t : Emu.GetIdManager().get_all<RawSPUThread>())
for (auto& t : idm::get_all<RawSPUThread>())
{
result.emplace_back(t);
}
for (auto& t : Emu.GetIdManager().get_all<ARMv7Thread>())
for (auto& t : idm::get_all<ARMv7Thread>())
{
result.emplace_back(t);
}
@ -57,12 +57,12 @@ std::vector<std::shared_ptr<CPUThread>> CPUThreadManager::GetAllThreads()
void CPUThreadManager::Exec()
{
for (auto& t : Emu.GetIdManager().get_all<PPUThread>())
for (auto& t : idm::get_all<PPUThread>())
{
t->exec();
}
for (auto& t : Emu.GetIdManager().get_all<ARMv7Thread>())
for (auto& t : idm::get_all<ARMv7Thread>())
{
t->exec();
}
@ -78,7 +78,7 @@ std::shared_ptr<RawSPUThread> CPUThreadManager::NewRawSPUThread()
{
if (m_raw_spu[i].expired())
{
m_raw_spu[i] = result = Emu.GetIdManager().make_ptr<RawSPUThread>(std::to_string(i), i);
m_raw_spu[i] = result = idm::make_ptr<RawSPUThread>(std::to_string(i), i);
break;
}
}