mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-26 21:51:13 +01:00
UI
optimize by passing by reference optimize by using std::move
This commit is contained in:
+3
-3
@@ -13,18 +13,18 @@ void UI_textbox::set_text(std::string text)
|
||||
{
|
||||
if (text == m_text)
|
||||
return;
|
||||
m_text = text;
|
||||
m_text = std::move(text);
|
||||
emit ui_changed();
|
||||
emit changed(m_text);
|
||||
}
|
||||
|
||||
void UI_textbox::set_hint(std::string hint)
|
||||
{
|
||||
m_hint = hint;
|
||||
m_hint = std::move(hint);
|
||||
emit ui_changed();
|
||||
}
|
||||
|
||||
std::string UI_textbox::hint() const
|
||||
std::string UI_textbox::hint() const &
|
||||
{
|
||||
return m_hint;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user