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.
This commit is contained in:
parent
fe2609cb77
commit
3fa2b218ac
1 changed files with 2 additions and 2 deletions
|
@ -129,13 +129,13 @@ QtSoftwareKeyboard::~QtSoftwareKeyboard() = default;
|
||||||
|
|
||||||
void QtSoftwareKeyboard::RequestText(std::function<void(std::optional<std::u16string>)> out,
|
void QtSoftwareKeyboard::RequestText(std::function<void(std::optional<std::u16string>)> out,
|
||||||
Core::Frontend::SoftwareKeyboardParameters parameters) const {
|
Core::Frontend::SoftwareKeyboardParameters parameters) const {
|
||||||
text_output = out;
|
text_output = std::move(out);
|
||||||
emit MainWindowGetText(parameters);
|
emit MainWindowGetText(parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QtSoftwareKeyboard::SendTextCheckDialog(std::u16string error_message,
|
void QtSoftwareKeyboard::SendTextCheckDialog(std::u16string error_message,
|
||||||
std::function<void()> finished_check) const {
|
std::function<void()> finished_check) const {
|
||||||
this->finished_check = finished_check;
|
this->finished_check = std::move(finished_check);
|
||||||
emit MainWindowTextCheckDialog(error_message);
|
emit MainWindowTextCheckDialog(error_message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue