SymbolDB: Use set to map hash with symbols

This commit is contained in:
Sepalani
2016-10-10 23:35:33 +01:00
parent 7e974f1064
commit 8d812db9ad
3 changed files with 7 additions and 5 deletions

View File

@ -65,7 +65,7 @@ Symbol* SymbolDB::GetSymbolFromHash(u32 hash)
{
XFuncPtrMap::iterator iter = checksumToFunction.find(hash);
if (iter != checksumToFunction.end())
return iter->second;
return *iter->second.begin();
else
return nullptr;
}
@ -76,7 +76,8 @@ std::vector<Symbol*> SymbolDB::GetSymbolsFromHash(u32 hash)
for (const auto& iter : checksumToFunction)
if (iter.first == hash)
symbols.push_back(iter.second);
for (const auto& symbol : iter.second)
symbols.push_back(symbol);
return symbols;
}