diff --git a/Source/Core/Common/SymbolDB.cpp b/Source/Core/Common/SymbolDB.cpp index f558b54ebb..cec02af226 100644 --- a/Source/Core/Common/SymbolDB.cpp +++ b/Source/Core/Common/SymbolDB.cpp @@ -72,14 +72,12 @@ Symbol* SymbolDB::GetSymbolFromHash(u32 hash) std::vector SymbolDB::GetSymbolsFromHash(u32 hash) { - std::vector 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)