Merge pull request #7138 from lioncash/mips

MIPSAnalyst: Pass strings by const reference.
This commit is contained in:
Henrik Rydgård 2014-12-05 22:58:23 +01:00
commit 5e9d111c95
2 changed files with 4 additions and 4 deletions

View File

@ -1108,7 +1108,7 @@ skip:
return 0;
}
void SetHashMapFilename(std::string filename) {
void SetHashMapFilename(const std::string& filename) {
if (filename.empty())
hashmapFileName = GetSysDirectory(DIRECTORY_SYSTEM) + "knownfuncs.ini";
else
@ -1180,7 +1180,7 @@ skip:
}
}
void LoadHashMap(std::string filename) {
void LoadHashMap(const std::string& filename) {
FILE *file = File::OpenCFile(filename, "rt");
if (!file) {
WARN_LOG(LOADER, "Could not load hash map: %s", filename.c_str());

View File

@ -107,9 +107,9 @@ namespace MIPSAnalyst
void ForgetFunctions(u32 startAddr, u32 endAddr);
void CompileLeafs();
void SetHashMapFilename(std::string filename = "");
void SetHashMapFilename(const std::string& filename = "");
void LoadBuiltinHashMap();
void LoadHashMap(std::string filename);
void LoadHashMap(const std::string& filename);
void StoreHashMap(std::string filename = "");
const char *LookupHash(u64 hash, u32 funcSize);