diff --git a/Core/MIPS/MIPSAnalyst.cpp b/Core/MIPS/MIPSAnalyst.cpp index 942e22ca3e..5e13526247 100644 --- a/Core/MIPS/MIPSAnalyst.cpp +++ b/Core/MIPS/MIPSAnalyst.cpp @@ -978,11 +978,11 @@ skip: } } - const char *LookupHash(u64 hash, int funcsize) { - for (auto it = hashMap.begin(), end = hashMap.end(); it != end; ++it) { - if (it->hash == hash && (int)it->size == funcsize) { - return it->name; - } + const char *LookupHash(u64 hash, u32 funcsize) { + const HashMapFunc f = { "", hash, funcsize }; + auto it = hashMap.find(f); + if (it != hashMap.end()) { + return it->name; } return 0; } diff --git a/Core/MIPS/MIPSAnalyst.h b/Core/MIPS/MIPSAnalyst.h index ab908f213d..bb25de880f 100644 --- a/Core/MIPS/MIPSAnalyst.h +++ b/Core/MIPS/MIPSAnalyst.h @@ -110,7 +110,7 @@ namespace MIPSAnalyst void LoadHashMap(std::string filename); void StoreHashMap(std::string filename = ""); - const char *LookupHash(u64 hash, int funcSize); + const char *LookupHash(u64 hash, u32 funcSize); void ReplaceFunctions(); void UpdateHashMap();