VERY experimental Nintendo Switch 2 emulator
C++
game_list: Eliminate variable shadowing
Morph7e75b94e3b32
diff --git a/src/yuzu/game_list.cpp b/src/yuzu/game_list.cppindex 64a866f34b..05d309827f 100644--- a/src/yuzu/game_list.cpp+++ b/src/yuzu/game_list.cpp@@ -28,8 +28,8 @@#include "yuzu/uisettings.h"#include "yuzu/util/controller_navigation.h"-GameListSearchField::KeyReleaseEater::KeyReleaseEater(GameList* gamelist, QObject* parent)- : QObject(parent), gamelist{gamelist} {}+GameListSearchField::KeyReleaseEater::KeyReleaseEater(GameList* gamelist_, QObject* parent)+ : QObject(parent), gamelist{gamelist_} {}// EventFilter in order to process systemkeys while editing the searchfieldbool GameListSearchField::KeyReleaseEater::eventFilter(QObject* obj, QEvent* event) {@@ -309,9 +309,9 @@ void GameList::OnFilterCloseClicked() {main_window->filterBarSetChecked(false);}-GameList::GameList(FileSys::VirtualFilesystem vfs, FileSys::ManualContentProvider* provider,+GameList::GameList(FileSys::VirtualFilesystem vfs_, FileSys::ManualContentProvider* provider_,Core::System& system_, GMainWindow* parent)- : QWidget{parent}, vfs(std::move(vfs)), provider(provider), system{system_} {+ : QWidget{parent}, vfs{std::move(vfs_)}, provider{provider_}, system{system_} {watcher = new QFileSystemWatcher(this);connect(watcher, &QFileSystemWatcher::directoryChanged, this, &GameList::RefreshGameDirectory);diff --git a/src/yuzu/game_list.h b/src/yuzu/game_list.hindex 464da98ada..bc36d015a9 100644--- a/src/yuzu/game_list.h+++ b/src/yuzu/game_list.h@@ -67,8 +67,8 @@ public:COLUMN_COUNT, // Number of columns};- explicit GameList(std::shared_ptr<FileSys::VfsFilesystem> vfs,- FileSys::ManualContentProvider* provider, Core::System& system_,+ explicit GameList(std::shared_ptr<FileSys::VfsFilesystem> vfs_,+ FileSys::ManualContentProvider* provider_, Core::System& system_,GMainWindow* parent = nullptr);~GameList() override;diff --git a/src/yuzu/game_list_p.h b/src/yuzu/game_list_p.hindex 582f6db5e9..cd7d63536b 100644--- a/src/yuzu/game_list_p.h+++ b/src/yuzu/game_list_p.h@@ -225,8 +225,8 @@ public:static constexpr int GameDirRole = Qt::UserRole + 2;explicit GameListDir(UISettings::GameDir& directory,- GameListItemType dir_type = GameListItemType::CustomDir)- : dir_type{dir_type} {+ GameListItemType dir_type_ = GameListItemType::CustomDir)+ : dir_type{dir_type_} {setData(type(), TypeRole);UISettings::GameDir* game_dir = &directory;@@ -356,7 +356,7 @@ public:private:class KeyReleaseEater : public QObject {public:- explicit KeyReleaseEater(GameList* gamelist, QObject* parent = nullptr);+ explicit KeyReleaseEater(GameList* gamelist_, QObject* parent = nullptr);private:GameList* gamelist = nullptr;diff --git a/src/yuzu/game_list_worker.cpp b/src/yuzu/game_list_worker.cppindex ca1899b5c2..63326968be 100644--- a/src/yuzu/game_list_worker.cpp+++ b/src/yuzu/game_list_worker.cpp@@ -223,12 +223,12 @@ QList<QStandardItem*> MakeGameListEntry(const std::string& path, const std::stri}} // Anonymous namespace-GameListWorker::GameListWorker(FileSys::VirtualFilesystem vfs,- FileSys::ManualContentProvider* provider,- QVector<UISettings::GameDir>& game_dirs,- const CompatibilityList& compatibility_list, Core::System& system_)- : vfs(std::move(vfs)), provider(provider), game_dirs(game_dirs),- compatibility_list(compatibility_list), system{system_} {}+GameListWorker::GameListWorker(FileSys::VirtualFilesystem vfs_,+ FileSys::ManualContentProvider* provider_,+ QVector<UISettings::GameDir>& game_dirs_,+ const CompatibilityList& compatibility_list_, Core::System& system_)+ : vfs{std::move(vfs_)}, provider{provider_}, game_dirs{game_dirs_},+ compatibility_list{compatibility_list_}, system{system_} {}GameListWorker::~GameListWorker() = default;diff --git a/src/yuzu/game_list_worker.h b/src/yuzu/game_list_worker.hindex 622d241fb3..24a4e92c3e 100644--- a/src/yuzu/game_list_worker.h+++ b/src/yuzu/game_list_worker.h@@ -33,10 +33,10 @@ class GameListWorker : public QObject, public QRunnable {Q_OBJECTpublic:- explicit GameListWorker(std::shared_ptr<FileSys::VfsFilesystem> vfs,- FileSys::ManualContentProvider* provider,- QVector<UISettings::GameDir>& game_dirs,- const CompatibilityList& compatibility_list, Core::System& system_);+ explicit GameListWorker(std::shared_ptr<FileSys::VfsFilesystem> vfs_,+ FileSys::ManualContentProvider* provider_,+ QVector<UISettings::GameDir>& game_dirs_,+ const CompatibilityList& compatibility_list_, Core::System& system_);~GameListWorker() override;/// Starts the processing of directory tree information.