Speed up debug build hashfunc lookup.

This commit is contained in:
Unknown W. Brackets committed 2014-05-31 10:03:00 -07:00
1 parent c2778d9a2a
commit 72eb15f282
2 files changed
+6 -6

No files matched your search

+5 -5
View File
@@ -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;
}
+1 -1
View File
@@ -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();