From 66978a772da04e438571cdd98529c736663817ee Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 17 Jan 2019 11:10:31 -0500 Subject: yuzu/web_browser: std::move std::function instances in OpenPage() Avoids the need to potentially reallocate the contained callbacks. --- src/yuzu/applets/web_browser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/yuzu/applets/web_browser.cpp b/src/yuzu/applets/web_browser.cpp index c59b7ade1..b801d38fe 100644 --- a/src/yuzu/applets/web_browser.cpp +++ b/src/yuzu/applets/web_browser.cpp @@ -87,8 +87,8 @@ QtWebBrowser::~QtWebBrowser() = default; void QtWebBrowser::OpenPage(std::string_view url, std::function unpack_romfs_callback, std::function finished_callback) const { - this->unpack_romfs_callback = unpack_romfs_callback; - this->finished_callback = finished_callback; + this->unpack_romfs_callback = std::move(unpack_romfs_callback); + this->finished_callback = std::move(finished_callback); const auto index = url.find('?'); if (index == std::string::npos) { -- cgit v1.2.3