diff options
| author | 2018-11-20 11:30:51 -0500 | |
|---|---|---|
| committer | 2018-11-20 11:34:19 -0500 | |
| commit | 3fa2b218acefe9ba91378115d3856cd4c6b665e0 (patch) | |
| tree | ce325a3e63ac9e0cf8e0b1b10dc217fd9370b152 /src | |
| parent | yuzu/applets/software_keyboard: Make slots private functions (diff) | |
| download | yuzu-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.cpp | 4 |
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 | ||
| 130 | void QtSoftwareKeyboard::RequestText(std::function<void(std::optional<std::u16string>)> out, | 130 | void 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 | ||
| 136 | void QtSoftwareKeyboard::SendTextCheckDialog(std::u16string error_message, | 136 | void 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 | ||