SWOGLWindow: Utilize the move constructor in PrintText

The previous code would always do a copy
This commit is contained in:
Lioncash 2016-09-21 13:06:03 -04:00
parent 99baa3268f
commit fc41e982e9

View File

@ -86,8 +86,7 @@ void SWOGLWindow::Prepare()
void SWOGLWindow::PrintText(const std::string& text, int x, int y, u32 color) void SWOGLWindow::PrintText(const std::string& text, int x, int y, u32 color)
{ {
TextData data{text, x, y, color}; m_text.push_back({text, x, y, color});
m_text.emplace_back(data);
} }
void SWOGLWindow::ShowImage(const u8* data, int stride, int width, int height, float aspect) void SWOGLWindow::ShowImage(const u8* data, int stride, int width, int height, float aspect)