diff options
| author | 2019-01-17 11:10:31 -0500 | |
|---|---|---|
| committer | 2019-01-17 11:10:35 -0500 | |
| commit | 66978a772da04e438571cdd98529c736663817ee (patch) | |
| tree | f0cf7a1c75215f1d1f84e4a07936d146ef9ba920 /src | |
| parent | yuzu/web_browser: Make slot functions private (diff) | |
| download | yuzu-66978a772da04e438571cdd98529c736663817ee.tar.gz yuzu-66978a772da04e438571cdd98529c736663817ee.tar.xz yuzu-66978a772da04e438571cdd98529c736663817ee.zip | |
yuzu/web_browser: std::move std::function instances in OpenPage()
Avoids the need to potentially reallocate the contained callbacks.
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/applets/web_browser.cpp | 4 |
1 files 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; | |||
| 87 | 87 | ||
| 88 | void QtWebBrowser::OpenPage(std::string_view url, std::function<void()> unpack_romfs_callback, | 88 | void QtWebBrowser::OpenPage(std::string_view url, std::function<void()> unpack_romfs_callback, |
| 89 | std::function<void()> finished_callback) const { | 89 | std::function<void()> finished_callback) const { |
| 90 | this->unpack_romfs_callback = unpack_romfs_callback; | 90 | this->unpack_romfs_callback = std::move(unpack_romfs_callback); |
| 91 | this->finished_callback = finished_callback; | 91 | this->finished_callback = std::move(finished_callback); |
| 92 | 92 | ||
| 93 | const auto index = url.find('?'); | 93 | const auto index = url.find('?'); |
| 94 | if (index == std::string::npos) { | 94 | if (index == std::string::npos) { |