diff options
| author | 2018-07-28 12:35:02 -0400 | |
|---|---|---|
| committer | 2018-08-06 23:06:33 -0400 | |
| commit | 5927cf0e177d1804bcc0d9f95aa3fe1c4d0f6201 (patch) | |
| tree | 889f9111aa75d73b620e332b4949cd8c304692b6 /src | |
| parent | Avoid parsing RomFS to directory in NCA (diff) | |
| download | yuzu-5927cf0e177d1804bcc0d9f95aa3fe1c4d0f6201.tar.gz yuzu-5927cf0e177d1804bcc0d9f95aa3fe1c4d0f6201.tar.xz yuzu-5927cf0e177d1804bcc0d9f95aa3fe1c4d0f6201.zip | |
Use const where applicable
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/file_sys/control_metadata.h | 2 | ||||
| -rw-r--r-- | src/core/loader/deconstructed_rom_directory.cpp | 2 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_gamelist.cpp | 8 | ||||
| -rw-r--r-- | src/yuzu/game_list.cpp | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/src/core/file_sys/control_metadata.h b/src/core/file_sys/control_metadata.h index 9fc02612a..6582cc240 100644 --- a/src/core/file_sys/control_metadata.h +++ b/src/core/file_sys/control_metadata.h | |||
| @@ -62,7 +62,7 @@ enum class Language : u8 { | |||
| 62 | Chinese = 14, | 62 | Chinese = 14, |
| 63 | }; | 63 | }; |
| 64 | 64 | ||
| 65 | static std::array<std::string, 15> LANGUAGE_NAMES = { | 65 | static constexpr std::array<const char*, 15> LANGUAGE_NAMES = { |
| 66 | "AmericanEnglish", "BritishEnglish", "Japanese", | 66 | "AmericanEnglish", "BritishEnglish", "Japanese", |
| 67 | "French", "German", "LatinAmericanSpanish", | 67 | "French", "German", "LatinAmericanSpanish", |
| 68 | "Spanish", "Italian", "Dutch", | 68 | "Spanish", "Italian", "Dutch", |
diff --git a/src/core/loader/deconstructed_rom_directory.cpp b/src/core/loader/deconstructed_rom_directory.cpp index cc88a44b6..4a028250b 100644 --- a/src/core/loader/deconstructed_rom_directory.cpp +++ b/src/core/loader/deconstructed_rom_directory.cpp | |||
| @@ -25,7 +25,7 @@ AppLoader_DeconstructedRomDirectory::AppLoader_DeconstructedRomDirectory(FileSys | |||
| 25 | // Icon | 25 | // Icon |
| 26 | FileSys::VirtualFile icon_file = nullptr; | 26 | FileSys::VirtualFile icon_file = nullptr; |
| 27 | for (const auto& language : FileSys::LANGUAGE_NAMES) { | 27 | for (const auto& language : FileSys::LANGUAGE_NAMES) { |
| 28 | icon_file = dir->GetFile("icon_" + language + ".dat"); | 28 | icon_file = dir->GetFile("icon_" + std::string(language) + ".dat"); |
| 29 | if (icon_file != nullptr) { | 29 | if (icon_file != nullptr) { |
| 30 | icon_data = icon_file->ReadAllBytes(); | 30 | icon_data = icon_file->ReadAllBytes(); |
| 31 | break; | 31 | break; |
diff --git a/src/yuzu/configuration/configure_gamelist.cpp b/src/yuzu/configuration/configure_gamelist.cpp index 072b3f96f..c81e716f9 100644 --- a/src/yuzu/configuration/configure_gamelist.cpp +++ b/src/yuzu/configuration/configure_gamelist.cpp | |||
| @@ -12,9 +12,9 @@ ConfigureGameList::ConfigureGameList(QWidget* parent) | |||
| 12 | : QWidget(parent), ui(new Ui::ConfigureGameList) { | 12 | : QWidget(parent), ui(new Ui::ConfigureGameList) { |
| 13 | ui->setupUi(this); | 13 | ui->setupUi(this); |
| 14 | 14 | ||
| 15 | static std::vector<std::pair<u32, std::string>> default_icon_sizes{ | 15 | static const std::vector<std::pair<u32, std::string>> default_icon_sizes{ |
| 16 | std::make_pair(0, "None"), std::make_pair(24, "Small"), | 16 | std::make_pair(0, "None"), std::make_pair(32, "Small"), |
| 17 | std::make_pair(48, "Standard"), std::make_pair(96, "Large"), | 17 | std::make_pair(64, "Standard"), std::make_pair(128, "Large"), |
| 18 | std::make_pair(256, "Full Size"), | 18 | std::make_pair(256, "Full Size"), |
| 19 | }; | 19 | }; |
| 20 | 20 | ||
| @@ -25,7 +25,7 @@ ConfigureGameList::ConfigureGameList(QWidget* parent) | |||
| 25 | size.first); | 25 | size.first); |
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | static std::vector<std::string> row_text_names{ | 28 | static const std::vector<std::string> row_text_names{ |
| 29 | "Filename", | 29 | "Filename", |
| 30 | "Filetype", | 30 | "Filetype", |
| 31 | "Title ID", | 31 | "Title ID", |
diff --git a/src/yuzu/game_list.cpp b/src/yuzu/game_list.cpp index 893c5f693..481d91be5 100644 --- a/src/yuzu/game_list.cpp +++ b/src/yuzu/game_list.cpp | |||
| @@ -466,7 +466,7 @@ void GameListWorker::AddFstEntriesToGameList(const std::string& dir_path, unsign | |||
| 466 | 466 | ||
| 467 | FileSys::VirtualFile icon_file = nullptr; | 467 | FileSys::VirtualFile icon_file = nullptr; |
| 468 | for (const auto& language : FileSys::LANGUAGE_NAMES) { | 468 | for (const auto& language : FileSys::LANGUAGE_NAMES) { |
| 469 | icon_file = control_dir->GetFile("icon_" + language + ".dat"); | 469 | icon_file = control_dir->GetFile("icon_" + std::string(language) + ".dat"); |
| 470 | if (icon_file != nullptr) { | 470 | if (icon_file != nullptr) { |
| 471 | icon = icon_file->ReadAllBytes(); | 471 | icon = icon_file->ReadAllBytes(); |
| 472 | break; | 472 | break; |