From f6d4a289d53516789ceb5f90f086ffe8b2822115 Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Sat, 5 Dec 2020 08:37:13 -0500 Subject: [PATCH] applets: Resolve variable shadowing --- src/core/hle/service/am/applets/general_backend.cpp | 2 +- src/yuzu/applets/controller.cpp | 4 ++-- src/yuzu/applets/controller.h | 2 +- src/yuzu/applets/error.cpp | 6 +++--- src/yuzu/applets/profile_select.cpp | 4 ++-- src/yuzu/applets/profile_select.h | 2 +- src/yuzu/applets/software_keyboard.cpp | 4 ++-- src/yuzu/applets/software_keyboard.h | 2 +- src/yuzu/applets/web_browser.cpp | 8 ++++---- src/yuzu/applets/web_browser.h | 4 ++-- 10 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/core/hle/service/am/applets/general_backend.cpp b/src/core/hle/service/am/applets/general_backend.cpp index bdb6fd464..ccce83de3 100644 --- a/src/core/hle/service/am/applets/general_backend.cpp +++ b/src/core/hle/service/am/applets/general_backend.cpp @@ -136,7 +136,7 @@ void Auth::Execute() { } void Auth::AuthFinished(bool is_successful) { - this->successful = is_successful; + successful = is_successful; struct Return { ResultCode result_code; diff --git a/src/yuzu/applets/controller.cpp b/src/yuzu/applets/controller.cpp index 6944478f3..a15e8ca2a 100644 --- a/src/yuzu/applets/controller.cpp +++ b/src/yuzu/applets/controller.cpp @@ -660,8 +660,8 @@ QtControllerSelector::QtControllerSelector(GMainWindow& parent) { QtControllerSelector::~QtControllerSelector() = default; void QtControllerSelector::ReconfigureControllers( - std::function callback, const Core::Frontend::ControllerParameters& parameters) const { - this->callback = std::move(callback); + std::function callback_, const Core::Frontend::ControllerParameters& parameters) const { + callback = std::move(callback_); emit MainWindowReconfigureControllers(parameters); } diff --git a/src/yuzu/applets/controller.h b/src/yuzu/applets/controller.h index 7a421d856..3518eed56 100644 --- a/src/yuzu/applets/controller.h +++ b/src/yuzu/applets/controller.h @@ -147,7 +147,7 @@ public: ~QtControllerSelector() override; void ReconfigureControllers( - std::function callback, + std::function callback_, const Core::Frontend::ControllerParameters& parameters) const override; signals: diff --git a/src/yuzu/applets/error.cpp b/src/yuzu/applets/error.cpp index 08ed57355..53a993cf6 100644 --- a/src/yuzu/applets/error.cpp +++ b/src/yuzu/applets/error.cpp @@ -17,7 +17,7 @@ QtErrorDisplay::QtErrorDisplay(GMainWindow& parent) { QtErrorDisplay::~QtErrorDisplay() = default; void QtErrorDisplay::ShowError(ResultCode error, std::function finished) const { - this->callback = std::move(finished); + callback = std::move(finished); emit MainWindowDisplayError( tr("An error has occured.\nPlease try again or contact the developer of the " "software.\n\nError Code: %1-%2 (0x%3)") @@ -28,7 +28,7 @@ void QtErrorDisplay::ShowError(ResultCode error, std::function finished) void QtErrorDisplay::ShowErrorWithTimestamp(ResultCode error, std::chrono::seconds time, std::function finished) const { - this->callback = std::move(finished); + callback = std::move(finished); const QDateTime date_time = QDateTime::fromSecsSinceEpoch(time.count()); emit MainWindowDisplayError( @@ -44,7 +44,7 @@ void QtErrorDisplay::ShowErrorWithTimestamp(ResultCode error, std::chrono::secon void QtErrorDisplay::ShowCustomErrorText(ResultCode error, std::string dialog_text, std::string fullscreen_text, std::function finished) const { - this->callback = std::move(finished); + callback = std::move(finished); emit MainWindowDisplayError( tr("An error has occured.\nError Code: %1-%2 (0x%3)\n\n%4\n\n%5") .arg(static_cast(error.module.Value()) + 2000, 4, 10, QChar::fromLatin1('0')) diff --git a/src/yuzu/applets/profile_select.cpp b/src/yuzu/applets/profile_select.cpp index c9a2f8601..4bf2bfd40 100644 --- a/src/yuzu/applets/profile_select.cpp +++ b/src/yuzu/applets/profile_select.cpp @@ -150,8 +150,8 @@ QtProfileSelector::QtProfileSelector(GMainWindow& parent) { QtProfileSelector::~QtProfileSelector() = default; void QtProfileSelector::SelectProfile( - std::function)> callback) const { - this->callback = std::move(callback); + std::function)> callback_) const { + callback = std::move(callback_); emit MainWindowSelectProfile(); } diff --git a/src/yuzu/applets/profile_select.h b/src/yuzu/applets/profile_select.h index 29c33cca0..4e9037488 100644 --- a/src/yuzu/applets/profile_select.h +++ b/src/yuzu/applets/profile_select.h @@ -60,7 +60,7 @@ public: explicit QtProfileSelector(GMainWindow& parent); ~QtProfileSelector() override; - void SelectProfile(std::function)> callback) const override; + void SelectProfile(std::function)> callback_) const override; signals: void MainWindowSelectProfile() const; diff --git a/src/yuzu/applets/software_keyboard.cpp b/src/yuzu/applets/software_keyboard.cpp index af36f07c6..ab8cfd8ee 100644 --- a/src/yuzu/applets/software_keyboard.cpp +++ b/src/yuzu/applets/software_keyboard.cpp @@ -135,8 +135,8 @@ void QtSoftwareKeyboard::RequestText(std::function finished_check) const { - this->finished_check = std::move(finished_check); + std::function finished_check_) const { + finished_check = std::move(finished_check_); emit MainWindowTextCheckDialog(error_message); } diff --git a/src/yuzu/applets/software_keyboard.h b/src/yuzu/applets/software_keyboard.h index 44bcece75..9e1094cce 100644 --- a/src/yuzu/applets/software_keyboard.h +++ b/src/yuzu/applets/software_keyboard.h @@ -61,7 +61,7 @@ public: void RequestText(std::function)> out, Core::Frontend::SoftwareKeyboardParameters parameters) const override; void SendTextCheckDialog(std::u16string error_message, - std::function finished_check) const override; + std::function finished_check_) const override; signals: void MainWindowGetText(Core::Frontend::SoftwareKeyboardParameters parameters) const; diff --git a/src/yuzu/applets/web_browser.cpp b/src/yuzu/applets/web_browser.cpp index 33f1c385d..9fd8d6326 100644 --- a/src/yuzu/applets/web_browser.cpp +++ b/src/yuzu/applets/web_browser.cpp @@ -87,10 +87,10 @@ QtWebBrowser::QtWebBrowser(GMainWindow& main_window) { QtWebBrowser::~QtWebBrowser() = default; -void QtWebBrowser::OpenPageLocal(std::string_view url, std::function unpack_romfs_callback, - std::function finished_callback) { - this->unpack_romfs_callback = std::move(unpack_romfs_callback); - this->finished_callback = std::move(finished_callback); +void QtWebBrowser::OpenPageLocal(std::string_view url, std::function unpack_romfs_callback_, + std::function finished_callback_) { + unpack_romfs_callback = std::move(unpack_romfs_callback_); + finished_callback = std::move(finished_callback_); const auto index = url.find('?'); if (index == std::string::npos) { diff --git a/src/yuzu/applets/web_browser.h b/src/yuzu/applets/web_browser.h index b38437e46..f801846cf 100644 --- a/src/yuzu/applets/web_browser.h +++ b/src/yuzu/applets/web_browser.h @@ -37,8 +37,8 @@ public: explicit QtWebBrowser(GMainWindow& main_window); ~QtWebBrowser() override; - void OpenPageLocal(std::string_view url, std::function unpack_romfs_callback, - std::function finished_callback) override; + void OpenPageLocal(std::string_view url, std::function unpack_romfs_callback_, + std::function finished_callback_) override; signals: void MainWindowOpenPage(std::string_view filename, std::string_view additional_args) const;