diff options
| author | 2022-05-26 19:57:35 -0400 | |
|---|---|---|
| committer | 2022-06-13 18:19:22 -0400 | |
| commit | b3d6f7bdd841098aa47f367d60c2ac0ab320dd98 (patch) | |
| tree | ec64b25f4db7424e8b762beb18239d327a1dea62 /src | |
| parent | web_service: Eliminate variable shadowing (diff) | |
| download | yuzu-b3d6f7bdd841098aa47f367d60c2ac0ab320dd98.tar.gz yuzu-b3d6f7bdd841098aa47f367d60c2ac0ab320dd98.tar.xz yuzu-b3d6f7bdd841098aa47f367d60c2ac0ab320dd98.zip | |
yuzu: Eliminate variable shadowing
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/bootmanager.cpp | 8 | ||||
| -rw-r--r-- | src/yuzu/bootmanager.h | 12 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_per_game.cpp | 4 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_per_game.h | 2 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_per_game_addons.cpp | 4 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_per_game_addons.h | 2 | ||||
| -rw-r--r-- | src/yuzu/game_list.cpp | 6 | ||||
| -rw-r--r-- | src/yuzu/game_list_p.h | 2 | ||||
| -rw-r--r-- | src/yuzu/main.cpp | 8 | ||||
| -rw-r--r-- | src/yuzu/main.h | 2 |
10 files changed, 25 insertions, 25 deletions
diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp index bde465485..fdc093524 100644 --- a/src/yuzu/bootmanager.cpp +++ b/src/yuzu/bootmanager.cpp | |||
| @@ -364,9 +364,9 @@ void GRenderWindow::RestoreGeometry() { | |||
| 364 | QWidget::restoreGeometry(geometry); | 364 | QWidget::restoreGeometry(geometry); |
| 365 | } | 365 | } |
| 366 | 366 | ||
| 367 | void GRenderWindow::restoreGeometry(const QByteArray& geometry) { | 367 | void GRenderWindow::restoreGeometry(const QByteArray& geometry_) { |
| 368 | // Make sure users of this class don't need to deal with backing up the geometry themselves | 368 | // Make sure users of this class don't need to deal with backing up the geometry themselves |
| 369 | QWidget::restoreGeometry(geometry); | 369 | QWidget::restoreGeometry(geometry_); |
| 370 | BackupGeometry(); | 370 | BackupGeometry(); |
| 371 | } | 371 | } |
| 372 | 372 | ||
| @@ -1014,8 +1014,8 @@ QStringList GRenderWindow::GetUnsupportedGLExtensions() const { | |||
| 1014 | return unsupported_ext; | 1014 | return unsupported_ext; |
| 1015 | } | 1015 | } |
| 1016 | 1016 | ||
| 1017 | void GRenderWindow::OnEmulationStarting(EmuThread* emu_thread) { | 1017 | void GRenderWindow::OnEmulationStarting(EmuThread* emu_thread_) { |
| 1018 | this->emu_thread = emu_thread; | 1018 | emu_thread = emu_thread_; |
| 1019 | } | 1019 | } |
| 1020 | 1020 | ||
| 1021 | void GRenderWindow::OnEmulationStopping() { | 1021 | void GRenderWindow::OnEmulationStopping() { |
diff --git a/src/yuzu/bootmanager.h b/src/yuzu/bootmanager.h index d01538039..81fe52c0e 100644 --- a/src/yuzu/bootmanager.h +++ b/src/yuzu/bootmanager.h | |||
| @@ -56,12 +56,12 @@ public: | |||
| 56 | 56 | ||
| 57 | /** | 57 | /** |
| 58 | * Sets whether the emulation thread is running or not | 58 | * Sets whether the emulation thread is running or not |
| 59 | * @param running Boolean value, set the emulation thread to running if true | 59 | * @param running_ Boolean value, set the emulation thread to running if true |
| 60 | * @note This function is thread-safe | 60 | * @note This function is thread-safe |
| 61 | */ | 61 | */ |
| 62 | void SetRunning(bool running) { | 62 | void SetRunning(bool running_) { |
| 63 | std::unique_lock lock{running_mutex}; | 63 | std::unique_lock lock{running_mutex}; |
| 64 | this->running = running; | 64 | running = running_; |
| 65 | lock.unlock(); | 65 | lock.unlock(); |
| 66 | running_cv.notify_all(); | 66 | running_cv.notify_all(); |
| 67 | if (!running) { | 67 | if (!running) { |
| @@ -138,8 +138,8 @@ public: | |||
| 138 | 138 | ||
| 139 | void BackupGeometry(); | 139 | void BackupGeometry(); |
| 140 | void RestoreGeometry(); | 140 | void RestoreGeometry(); |
| 141 | void restoreGeometry(const QByteArray& geometry); // overridden | 141 | void restoreGeometry(const QByteArray& geometry_); // overridden |
| 142 | QByteArray saveGeometry(); // overridden | 142 | QByteArray saveGeometry(); // overridden |
| 143 | 143 | ||
| 144 | qreal windowPixelRatio() const; | 144 | qreal windowPixelRatio() const; |
| 145 | 145 | ||
| @@ -189,7 +189,7 @@ public: | |||
| 189 | void Exit(); | 189 | void Exit(); |
| 190 | 190 | ||
| 191 | public slots: | 191 | public slots: |
| 192 | void OnEmulationStarting(EmuThread* emu_thread); | 192 | void OnEmulationStarting(EmuThread* emu_thread_); |
| 193 | void OnEmulationStopping(); | 193 | void OnEmulationStopping(); |
| 194 | void OnFramebufferSizeChanged(); | 194 | void OnFramebufferSizeChanged(); |
| 195 | 195 | ||
diff --git a/src/yuzu/configuration/configure_per_game.cpp b/src/yuzu/configuration/configure_per_game.cpp index 54b3fe150..e7826b692 100644 --- a/src/yuzu/configuration/configure_per_game.cpp +++ b/src/yuzu/configuration/configure_per_game.cpp | |||
| @@ -116,8 +116,8 @@ void ConfigurePerGame::HandleApplyButtonClicked() { | |||
| 116 | ApplyConfiguration(); | 116 | ApplyConfiguration(); |
| 117 | } | 117 | } |
| 118 | 118 | ||
| 119 | void ConfigurePerGame::LoadFromFile(FileSys::VirtualFile file) { | 119 | void ConfigurePerGame::LoadFromFile(FileSys::VirtualFile file_) { |
| 120 | this->file = std::move(file); | 120 | file = std::move(file_); |
| 121 | LoadConfiguration(); | 121 | LoadConfiguration(); |
| 122 | } | 122 | } |
| 123 | 123 | ||
diff --git a/src/yuzu/configuration/configure_per_game.h b/src/yuzu/configuration/configure_per_game.h index e6dc05546..cf71eb68b 100644 --- a/src/yuzu/configuration/configure_per_game.h +++ b/src/yuzu/configuration/configure_per_game.h | |||
| @@ -46,7 +46,7 @@ public: | |||
| 46 | /// Save all button configurations to settings file | 46 | /// Save all button configurations to settings file |
| 47 | void ApplyConfiguration(); | 47 | void ApplyConfiguration(); |
| 48 | 48 | ||
| 49 | void LoadFromFile(FileSys::VirtualFile file); | 49 | void LoadFromFile(FileSys::VirtualFile file_); |
| 50 | 50 | ||
| 51 | private: | 51 | private: |
| 52 | void changeEvent(QEvent* event) override; | 52 | void changeEvent(QEvent* event) override; |
diff --git a/src/yuzu/configuration/configure_per_game_addons.cpp b/src/yuzu/configuration/configure_per_game_addons.cpp index 7893a85bb..4906997ab 100644 --- a/src/yuzu/configuration/configure_per_game_addons.cpp +++ b/src/yuzu/configuration/configure_per_game_addons.cpp | |||
| @@ -89,8 +89,8 @@ void ConfigurePerGameAddons::ApplyConfiguration() { | |||
| 89 | Settings::values.disabled_addons[title_id] = disabled_addons; | 89 | Settings::values.disabled_addons[title_id] = disabled_addons; |
| 90 | } | 90 | } |
| 91 | 91 | ||
| 92 | void ConfigurePerGameAddons::LoadFromFile(FileSys::VirtualFile file) { | 92 | void ConfigurePerGameAddons::LoadFromFile(FileSys::VirtualFile file_) { |
| 93 | this->file = std::move(file); | 93 | file = std::move(file_); |
| 94 | LoadConfiguration(); | 94 | LoadConfiguration(); |
| 95 | } | 95 | } |
| 96 | 96 | ||
diff --git a/src/yuzu/configuration/configure_per_game_addons.h b/src/yuzu/configuration/configure_per_game_addons.h index 24b017494..14690fba8 100644 --- a/src/yuzu/configuration/configure_per_game_addons.h +++ b/src/yuzu/configuration/configure_per_game_addons.h | |||
| @@ -35,7 +35,7 @@ public: | |||
| 35 | /// Save all button configurations to settings file | 35 | /// Save all button configurations to settings file |
| 36 | void ApplyConfiguration(); | 36 | void ApplyConfiguration(); |
| 37 | 37 | ||
| 38 | void LoadFromFile(FileSys::VirtualFile file); | 38 | void LoadFromFile(FileSys::VirtualFile file_); |
| 39 | 39 | ||
| 40 | void SetTitleId(u64 id); | 40 | void SetTitleId(u64 id); |
| 41 | 41 | ||
diff --git a/src/yuzu/game_list.cpp b/src/yuzu/game_list.cpp index 6321afc83..64a866f34 100644 --- a/src/yuzu/game_list.cpp +++ b/src/yuzu/game_list.cpp | |||
| @@ -80,9 +80,9 @@ bool GameListSearchField::KeyReleaseEater::eventFilter(QObject* obj, QEvent* eve | |||
| 80 | return QObject::eventFilter(obj, event); | 80 | return QObject::eventFilter(obj, event); |
| 81 | } | 81 | } |
| 82 | 82 | ||
| 83 | void GameListSearchField::setFilterResult(int visible, int total) { | 83 | void GameListSearchField::setFilterResult(int visible_, int total_) { |
| 84 | this->visible = visible; | 84 | visible = visible_; |
| 85 | this->total = total; | 85 | total = total_; |
| 86 | 86 | ||
| 87 | label_filter_result->setText(tr("%1 of %n result(s)", "", total).arg(visible)); | 87 | label_filter_result->setText(tr("%1 of %n result(s)", "", total).arg(visible)); |
| 88 | } | 88 | } |
diff --git a/src/yuzu/game_list_p.h b/src/yuzu/game_list_p.h index f2a986ed8..582f6db5e 100644 --- a/src/yuzu/game_list_p.h +++ b/src/yuzu/game_list_p.h | |||
| @@ -348,7 +348,7 @@ public: | |||
| 348 | explicit GameListSearchField(GameList* parent = nullptr); | 348 | explicit GameListSearchField(GameList* parent = nullptr); |
| 349 | 349 | ||
| 350 | QString filterText() const; | 350 | QString filterText() const; |
| 351 | void setFilterResult(int visible, int total); | 351 | void setFilterResult(int visible_, int total_); |
| 352 | 352 | ||
| 353 | void clear(); | 353 | void clear(); |
| 354 | void setFocus(); | 354 | void setFocus(); |
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 33886e50e..7dc9b6743 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -1442,7 +1442,7 @@ bool GMainWindow::LoadROM(const QString& filename, u64 program_id, std::size_t p | |||
| 1442 | } | 1442 | } |
| 1443 | return false; | 1443 | return false; |
| 1444 | } | 1444 | } |
| 1445 | game_path = filename; | 1445 | current_game_path = filename; |
| 1446 | 1446 | ||
| 1447 | system->TelemetrySession().AddField(Common::Telemetry::FieldType::App, "Frontend", "Qt"); | 1447 | system->TelemetrySession().AddField(Common::Telemetry::FieldType::App, "Frontend", "Qt"); |
| 1448 | return true; | 1448 | return true; |
| @@ -1641,7 +1641,7 @@ void GMainWindow::ShutdownGame() { | |||
| 1641 | emu_frametime_label->setVisible(false); | 1641 | emu_frametime_label->setVisible(false); |
| 1642 | renderer_status_button->setEnabled(!UISettings::values.has_broken_vulkan); | 1642 | renderer_status_button->setEnabled(!UISettings::values.has_broken_vulkan); |
| 1643 | 1643 | ||
| 1644 | game_path.clear(); | 1644 | current_game_path.clear(); |
| 1645 | 1645 | ||
| 1646 | // When closing the game, destroy the GLWindow to clear the context after the game is closed | 1646 | // When closing the game, destroy the GLWindow to clear the context after the game is closed |
| 1647 | render_window->ReleaseRenderTarget(); | 1647 | render_window->ReleaseRenderTarget(); |
| @@ -2560,7 +2560,7 @@ void GMainWindow::OnRestartGame() { | |||
| 2560 | return; | 2560 | return; |
| 2561 | } | 2561 | } |
| 2562 | // Make a copy since BootGame edits game_path | 2562 | // Make a copy since BootGame edits game_path |
| 2563 | BootGame(QString(game_path)); | 2563 | BootGame(QString(current_game_path)); |
| 2564 | } | 2564 | } |
| 2565 | 2565 | ||
| 2566 | void GMainWindow::OnPauseGame() { | 2566 | void GMainWindow::OnPauseGame() { |
| @@ -2989,7 +2989,7 @@ void GMainWindow::OnToggleAdaptingFilter() { | |||
| 2989 | 2989 | ||
| 2990 | void GMainWindow::OnConfigurePerGame() { | 2990 | void GMainWindow::OnConfigurePerGame() { |
| 2991 | const u64 title_id = system->GetCurrentProcessProgramID(); | 2991 | const u64 title_id = system->GetCurrentProcessProgramID(); |
| 2992 | OpenPerGameConfiguration(title_id, game_path.toStdString()); | 2992 | OpenPerGameConfiguration(title_id, current_game_path.toStdString()); |
| 2993 | } | 2993 | } |
| 2994 | 2994 | ||
| 2995 | void GMainWindow::OpenPerGameConfiguration(u64 title_id, const std::string& file_name) { | 2995 | void GMainWindow::OpenPerGameConfiguration(u64 title_id, const std::string& file_name) { |
diff --git a/src/yuzu/main.h b/src/yuzu/main.h index 600647015..8cf224c9c 100644 --- a/src/yuzu/main.h +++ b/src/yuzu/main.h | |||
| @@ -369,7 +369,7 @@ private: | |||
| 369 | bool emulation_running = false; | 369 | bool emulation_running = false; |
| 370 | std::unique_ptr<EmuThread> emu_thread; | 370 | std::unique_ptr<EmuThread> emu_thread; |
| 371 | // The path to the game currently running | 371 | // The path to the game currently running |
| 372 | QString game_path; | 372 | QString current_game_path; |
| 373 | 373 | ||
| 374 | bool auto_paused = false; | 374 | bool auto_paused = false; |
| 375 | bool auto_muted = false; | 375 | bool auto_muted = false; |