VideoCommon/OnScreenDisplay: Take Message's std::string parameter by value

Allows callers to std::move strings into the functions (or automatically
assume the move constructor/move assignment operator for rvalue
references, potentially avoiding copies altogether.
This commit is contained in:
Lioncash
2019-07-28 22:46:08 -04:00
parent 50b240fcbd
commit c212310fbe
7 changed files with 18 additions and 17 deletions

View File

@ -36,9 +36,9 @@ void WriteHostMemory(u8 value, u32 addr)
DSP::WriteARAM(value, addr);
}
void OSD_AddMessage(const std::string& str, u32 ms)
void OSD_AddMessage(std::string str, u32 ms)
{
OSD::AddMessage(str, ms);
OSD::AddMessage(std::move(str), ms);
}
bool OnThread()