瀏覽代碼

yuzu/applets/software_keyboard: std::move argument in MainWindowFinishedText()

Given the std::optional can contain an object type that heap allocates,
we can use std::move to avoid an unnecessary copy/allocation from
occurring.
Lioncash 7 年之前
父節點
當前提交
16bf791939
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/yuzu/applets/software_keyboard.cpp

+ 1 - 1
src/yuzu/applets/software_keyboard.cpp

@@ -149,7 +149,7 @@ void QtSoftwareKeyboard::SendTextCheckDialog(std::u16string error_message,
 void QtSoftwareKeyboard::MainWindowFinishedText(std::optional<std::u16string> text) {
     // Acquire the HLE mutex
     std::lock_guard lock{HLE::g_hle_lock};
-    text_output(text);
+    text_output(std::move(text));
 }
 
 void QtSoftwareKeyboard::MainWindowFinishedCheckDialog() {