From 3fa2b218acefe9ba91378115d3856cd4c6b665e0 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 20 Nov 2018 11:30:51 -0500 Subject: [PATCH] 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. --- src/yuzu/applets/software_keyboard.cpp | 4 ++-- 1 file 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; void QtSoftwareKeyboard::RequestText(std::function)> 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 finished_check) const { - this->finished_check = finished_check; + this->finished_check = std::move(finished_check); emit MainWindowTextCheckDialog(error_message); }