summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Lioncash2018-11-20 11:30:51 -0500
committerGravatar Lioncash2018-11-20 11:34:19 -0500
commit3fa2b218acefe9ba91378115d3856cd4c6b665e0 (patch)
treece325a3e63ac9e0cf8e0b1b10dc217fd9370b152 /src
parentyuzu/applets/software_keyboard: Make slots private functions (diff)
downloadyuzu-3fa2b218acefe9ba91378115d3856cd4c6b665e0.tar.gz
yuzu-3fa2b218acefe9ba91378115d3856cd4c6b665e0.tar.xz
yuzu-3fa2b218acefe9ba91378115d3856cd4c6b665e0.zip
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.
Diffstat (limited to 'src')
-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 efefb1f99..338d91426 100644
--- a/src/yuzu/applets/software_keyboard.cpp
+++ b/src/yuzu/applets/software_keyboard.cpp
@@ -129,13 +129,13 @@ QtSoftwareKeyboard::~QtSoftwareKeyboard() = default;
129 129
130void QtSoftwareKeyboard::RequestText(std::function<void(std::optional<std::u16string>)> out, 130void QtSoftwareKeyboard::RequestText(std::function<void(std::optional<std::u16string>)> out,
131 Core::Frontend::SoftwareKeyboardParameters parameters) const { 131 Core::Frontend::SoftwareKeyboardParameters parameters) const {
132 text_output = out; 132 text_output = std::move(out);
133 emit MainWindowGetText(parameters); 133 emit MainWindowGetText(parameters);
134} 134}
135 135
136void QtSoftwareKeyboard::SendTextCheckDialog(std::u16string error_message, 136void QtSoftwareKeyboard::SendTextCheckDialog(std::u16string error_message,
137 std::function<void()> finished_check) const { 137 std::function<void()> finished_check) const {
138 this->finished_check = finished_check; 138 this->finished_check = std::move(finished_check);
139 emit MainWindowTextCheckDialog(error_message); 139 emit MainWindowTextCheckDialog(error_message);
140} 140}
141 141