From 15aa29d17805bf433224453778cd6b14be15d8ee Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 5 Dec 2014 13:12:49 -0500 Subject: [PATCH] MIPSAnalyst: Pass strings by const reference. --- Core/MIPS/MIPSAnalyst.cpp | 4 ++-- Core/MIPS/MIPSAnalyst.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Core/MIPS/MIPSAnalyst.cpp b/Core/MIPS/MIPSAnalyst.cpp index 1344d48329..8ba9b43358 100644 --- a/Core/MIPS/MIPSAnalyst.cpp +++ b/Core/MIPS/MIPSAnalyst.cpp @@ -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()); diff --git a/Core/MIPS/MIPSAnalyst.h b/Core/MIPS/MIPSAnalyst.h index fa6188913d..72c1ba892f 100644 --- a/Core/MIPS/MIPSAnalyst.h +++ b/Core/MIPS/MIPSAnalyst.h @@ -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);