mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
SymbolDB: Use set to map hash with symbols
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
@ -8,6 +8,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
@ -57,7 +58,7 @@ class SymbolDB
|
||||
{
|
||||
public:
|
||||
typedef std::map<u32, Symbol> XFuncMap;
|
||||
typedef std::map<u32, Symbol*> XFuncPtrMap;
|
||||
typedef std::map<u32, std::set<Symbol*>> XFuncPtrMap;
|
||||
|
||||
protected:
|
||||
XFuncMap functions;
|
||||
|
Reference in New Issue
Block a user