Pass strings by const reference where possible

This commit is contained in:
Lioncash
2015-05-28 20:28:48 -04:00
parent 6ff3fcee59
commit ac26f8e79f
21 changed files with 32 additions and 32 deletions

View File

@ -127,15 +127,15 @@ void SetIsFramelimiterTempDisabled(bool disable)
}
std::string GetStateFileName() { return s_state_filename; }
void SetStateFileName(std::string val) { s_state_filename = val; }
void SetStateFileName(const std::string& val) { s_state_filename = val; }
// Display messages and return values
// Formatted stop message
std::string StopMessage(bool bMainThread, std::string Message)
std::string StopMessage(bool main_thread, const std::string& message)
{
return StringFromFormat("Stop [%s %i]\t%s\t%s",
bMainThread ? "Main Thread" : "Video Thread", Common::CurrentThreadId(), MemUsage().c_str(), Message.c_str());
main_thread ? "Main Thread" : "Video Thread", Common::CurrentThreadId(), MemUsage().c_str(), message.c_str());
}
void DisplayMessage(const std::string& message, int time_in_ms)