Merge pull request #4929 from lioncash/symboldb

SymbolDB: Simplify GetSymbolsFromHash
This commit is contained in:
Markus Wick 2017-02-23 10:55:28 +01:00 committed by GitHub
commit 25a569e6e9
1 changed files with 4 additions and 6 deletions

View File

@ -72,14 +72,12 @@ Symbol* SymbolDB::GetSymbolFromHash(u32 hash)
std::vector<Symbol*> SymbolDB::GetSymbolsFromHash(u32 hash)
{
std::vector<Symbol*> symbols;
const auto iter = checksumToFunction.find(hash);
for (const auto& iter : checksumToFunction)
if (iter.first == hash)
for (const auto& symbol : iter.second)
symbols.push_back(symbol);
if (iter == checksumToFunction.cend())
return {};
return symbols;
return {iter->second.cbegin(), iter->second.cend()};
}
void SymbolDB::AddCompleteSymbol(const Symbol& symbol)