mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 11:49:06 +00:00
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:
parent
50b240fcbd
commit
c212310fbe
7 changed files with 18 additions and 17 deletions
|
@ -37,10 +37,11 @@ constexpr u32 VERY_LONG = 10000;
|
|||
}; // namespace Duration
|
||||
|
||||
// On-screen message display (colored yellow by default)
|
||||
void AddMessage(const std::string& message, u32 ms = Duration::SHORT, u32 rgba = Color::YELLOW);
|
||||
void AddTypedMessage(MessageType type, const std::string& message, u32 ms = Duration::SHORT,
|
||||
void AddMessage(std::string message, u32 ms = Duration::SHORT, u32 rgba = Color::YELLOW);
|
||||
void AddTypedMessage(MessageType type, std::string message, u32 ms = Duration::SHORT,
|
||||
u32 rgba = Color::YELLOW);
|
||||
void DrawMessages(); // draw the current messages on the screen. Only call once
|
||||
// per frame.
|
||||
|
||||
// Draw the current messages on the screen. Only call once per frame.
|
||||
void DrawMessages();
|
||||
void ClearMessages();
|
||||
} // namespace OSD
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue