yuzu-emu
/
yuzu
Archived
1
0
Fork 0

yuzu/web_browser: std::move std::function instances in OpenPage()

Avoids the need to potentially reallocate the contained callbacks.
This commit is contained in:
Lioncash 2019-01-17 11:10:31 -05:00
parent e4fa77ef6a
commit 66978a772d
1 changed files with 2 additions and 2 deletions

View File

@ -87,8 +87,8 @@ QtWebBrowser::~QtWebBrowser() = default;
void QtWebBrowser::OpenPage(std::string_view url, std::function<void()> unpack_romfs_callback, void QtWebBrowser::OpenPage(std::string_view url, std::function<void()> unpack_romfs_callback,
std::function<void()> finished_callback) const { std::function<void()> finished_callback) const {
this->unpack_romfs_callback = unpack_romfs_callback; this->unpack_romfs_callback = std::move(unpack_romfs_callback);
this->finished_callback = finished_callback; this->finished_callback = std::move(finished_callback);
const auto index = url.find('?'); const auto index = url.find('?');
if (index == std::string::npos) { if (index == std::string::npos) {