aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-11-20 11:30:51 -0500
committerLioncash <mathew1800@gmail.com>2018-11-20 11:34:19 -0500
commit3fa2b218acefe9ba91378115d3856cd4c6b665e0 (patch)
treece325a3e63ac9e0cf8e0b1b10dc217fd9370b152
parentfe2609cb77692bf66783e364db920cbfe1bff078 (diff)
yuzu/applets/software_keyboard: std::move std::function instances where applicable
std::function instances can potentially allocate. std::moveing them prevents an avoidable allocation in that case.
-rw-r--r--src/yuzu/applets/software_keyboard.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/yuzu/applets/software_keyboard.cpp b/src/yuzu/applets/software_keyboard.cpp
index efefb1f99f..338d914262 100644
--- a/src/yuzu/applets/software_keyboard.cpp
+++ b/src/yuzu/applets/software_keyboard.cpp
@@ -129,13 +129,13 @@ QtSoftwareKeyboard::~QtSoftwareKeyboard() = default;
void QtSoftwareKeyboard::RequestText(std::function<void(std::optional<std::u16string>)> out,
Core::Frontend::SoftwareKeyboardParameters parameters) const {
- text_output = out;
+ text_output = std::move(out);
emit MainWindowGetText(parameters);
}
void QtSoftwareKeyboard::SendTextCheckDialog(std::u16string error_message,
std::function<void()> finished_check) const {
- this->finished_check = finished_check;
+ this->finished_check = std::move(finished_check);
emit MainWindowTextCheckDialog(error_message);
}