summaryrefslogtreecommitdiff
path: root/src/yuzu
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-10-05 20:41:20 -0400
committerGitHub <noreply@github.com>2019-10-05 20:41:20 -0400
commitdeecd7f074a0547b8fc08a33fdc547eb63859e3e (patch)
treed70efa81b1824d2dc351b7355d5016e75027ed8f /src/yuzu
parent6f511c8006f73206519731db8bd7117fb629b56f (diff)
parent25ee892d5e18c764dc46db409caa18a11fd9221d (diff)
Merge pull request #2942 from ReinUsesLisp/clang-warnings
Silence miscellaneous warnings
Diffstat (limited to 'src/yuzu')
-rw-r--r--src/yuzu/configuration/configure_service.cpp2
-rw-r--r--src/yuzu/game_list.cpp8
-rw-r--r--src/yuzu/game_list_p.h9
-rw-r--r--src/yuzu/game_list_worker.cpp12
-rw-r--r--src/yuzu/game_list_worker.h5
5 files changed, 23 insertions, 13 deletions
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<QString, QString> 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.")};
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<int>(dir_type);
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<u8> 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<FileSys::VfsFilesystem> vfs;
FileSys::ManualContentProvider* provider;
- QStringList watch_list;
- const CompatibilityList& compatibility_list;
QVector<UISettings::GameDir>& game_dirs;
+ const CompatibilityList& compatibility_list;
+
+ QStringList watch_list;
std::atomic_bool stop_processing;
};