From 2b9b695fa70a2fec13623b051437671a66bb1a0c Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Fri, 4 Oct 2019 23:33:37 +0000 Subject: yuzu/configure_service: Silence -Wswitch --- src/yuzu/configuration/configure_service.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/yuzu') diff --git a/src/yuzu/configuration/configure_service.cpp b/src/yuzu/configuration/configure_service.cpp index 81c9e933f..06566e981 100644 --- a/src/yuzu/configuration/configure_service.cpp +++ b/src/yuzu/configuration/configure_service.cpp @@ -73,6 +73,8 @@ std::pair ConfigureService::BCATDownloadEvents() { const auto res = Service::BCAT::Boxcat::GetStatus(global, map); switch (res) { + case Service::BCAT::Boxcat::StatusResult::Success: + break; case Service::BCAT::Boxcat::StatusResult::Offline: return {QString{}, tr("The boxcat service is offline or you are not connected to the internet.")}; -- cgit v1.2.3 From f297e9ff22b245ca5050d63a727b1d1e59840709 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Fri, 4 Oct 2019 23:35:06 +0000 Subject: yuzu/game_list: Silence -Wswitch and -Wunused-variable --- src/yuzu/game_list.cpp | 8 ++++++-- src/yuzu/game_list_p.h | 9 ++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) (limited to 'src/yuzu') diff --git a/src/yuzu/game_list.cpp b/src/yuzu/game_list.cpp index d5fab2f1f..a2b88c787 100644 --- a/src/yuzu/game_list.cpp +++ b/src/yuzu/game_list.cpp @@ -172,9 +172,7 @@ void GameList::onTextChanged(const QString& new_text) { const int folder_count = tree_view->model()->rowCount(); QString edit_filter_text = new_text.toLower(); QStandardItem* folder; - QStandardItem* child; int children_total = 0; - QModelIndex root_index = item_model->invisibleRootItem()->index(); // If the searchfield is empty every item is visible // Otherwise the filter gets applied @@ -272,6 +270,8 @@ void GameList::onUpdateThemedIcons() { .scaled(icon_size, icon_size, Qt::IgnoreAspectRatio, Qt::SmoothTransformation), Qt::DecorationRole); break; + default: + break; } } } @@ -392,6 +392,8 @@ void GameList::ValidateEntry(const QModelIndex& item) { case GameListItemType::AddDir: emit AddDirectory(); break; + default: + break; } } @@ -462,6 +464,8 @@ void GameList::PopupContextMenu(const QPoint& menu_location) { case GameListItemType::SysNandDir: AddPermDirPopup(context_menu, selected); break; + default: + break; } context_menu.exec(tree_view->viewport()->mapToGlobal(menu_location)); } diff --git a/src/yuzu/game_list_p.h b/src/yuzu/game_list_p.h index a8d888fee..1c2b37afd 100644 --- a/src/yuzu/game_list_p.h +++ b/src/yuzu/game_list_p.h @@ -247,7 +247,7 @@ public: Qt::DecorationRole); setData(QObject::tr("System Titles"), Qt::DisplayRole); break; - case GameListItemType::CustomDir: + case GameListItemType::CustomDir: { const QString icon_name = QFileInfo::exists(game_dir->path) ? QStringLiteral("folder") : QStringLiteral("bad_folder"); @@ -256,8 +256,11 @@ public: Qt::DecorationRole); setData(game_dir->path, Qt::DisplayRole); break; - }; - }; + } + default: + break; + } + } int type() const override { return static_cast(dir_type); -- cgit v1.2.3 From e1afeec76df0d8ad9e0284eed78a9c1bd1d6b28c Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Fri, 4 Oct 2019 23:41:02 +0000 Subject: yuzu/game_list_worker: Silence warnings --- src/yuzu/game_list_worker.cpp | 12 ++++++------ src/yuzu/game_list_worker.h | 5 +++-- 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'src/yuzu') diff --git a/src/yuzu/game_list_worker.cpp b/src/yuzu/game_list_worker.cpp index fd21a9761..4c81ef12b 100644 --- a/src/yuzu/game_list_worker.cpp +++ b/src/yuzu/game_list_worker.cpp @@ -326,10 +326,10 @@ void GameListWorker::ScanFileSystem(ScanTarget target, const std::string& dir_pa } } else { std::vector icon; - const auto res1 = loader->ReadIcon(icon); + [[maybe_unused]] const auto res1 = loader->ReadIcon(icon); std::string name = " "; - const auto res3 = loader->ReadTitle(name); + [[maybe_unused]] const auto res3 = loader->ReadTitle(name); const FileSys::PatchManager patch{program_id}; @@ -354,20 +354,20 @@ void GameListWorker::run() { for (UISettings::GameDir& game_dir : game_dirs) { if (game_dir.path == QStringLiteral("SDMC")) { auto* const game_list_dir = new GameListDir(game_dir, GameListItemType::SdmcDir); - emit DirEntryReady({game_list_dir}); + emit DirEntryReady(game_list_dir); AddTitlesToGameList(game_list_dir); } else if (game_dir.path == QStringLiteral("UserNAND")) { auto* const game_list_dir = new GameListDir(game_dir, GameListItemType::UserNandDir); - emit DirEntryReady({game_list_dir}); + emit DirEntryReady(game_list_dir); AddTitlesToGameList(game_list_dir); } else if (game_dir.path == QStringLiteral("SysNAND")) { auto* const game_list_dir = new GameListDir(game_dir, GameListItemType::SysNandDir); - emit DirEntryReady({game_list_dir}); + emit DirEntryReady(game_list_dir); AddTitlesToGameList(game_list_dir); } else { watch_list.append(game_dir.path); auto* const game_list_dir = new GameListDir(game_dir); - emit DirEntryReady({game_list_dir}); + emit DirEntryReady(game_list_dir); provider->ClearAllEntries(); ScanFileSystem(ScanTarget::FillManualContentProvider, game_dir.path.toStdString(), 2, game_list_dir); diff --git a/src/yuzu/game_list_worker.h b/src/yuzu/game_list_worker.h index 6e52fca89..84e4e1b42 100644 --- a/src/yuzu/game_list_worker.h +++ b/src/yuzu/game_list_worker.h @@ -75,8 +75,9 @@ private: std::shared_ptr vfs; FileSys::ManualContentProvider* provider; - QStringList watch_list; - const CompatibilityList& compatibility_list; QVector& game_dirs; + const CompatibilityList& compatibility_list; + + QStringList watch_list; std::atomic_bool stop_processing; }; -- cgit v1.2.3