diff options
| author | 2023-02-14 11:13:47 -0500 | |
|---|---|---|
| committer | 2023-02-14 12:35:39 -0500 | |
| commit | 683019878fc939b418a65e1c5d84b066596d7655 (patch) | |
| tree | 6b2a2e8ea34cb00a3fccf3613a52475550997035 /src/core/file_sys | |
| parent | apply clang-format (diff) | |
| download | yuzu-683019878fc939b418a65e1c5d84b066596d7655.tar.gz yuzu-683019878fc939b418a65e1c5d84b066596d7655.tar.xz yuzu-683019878fc939b418a65e1c5d84b066596d7655.zip | |
remove static from pointer sized or smaller types for aesthetics, change constexpr static to static constexpr for consistency
Signed-off-by: arades79 <scravers@protonmail.com>
Diffstat (limited to 'src/core/file_sys')
| -rw-r--r-- | src/core/file_sys/ips_layer.cpp | 8 | ||||
| -rw-r--r-- | src/core/file_sys/program_metadata.cpp | 2 | ||||
| -rw-r--r-- | src/core/file_sys/registered_cache.cpp | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/core/file_sys/ips_layer.cpp b/src/core/file_sys/ips_layer.cpp index 0a86e8b0a..efdf18cee 100644 --- a/src/core/file_sys/ips_layer.cpp +++ b/src/core/file_sys/ips_layer.cpp | |||
| @@ -41,12 +41,12 @@ static IPSFileType IdentifyMagic(const std::vector<u8>& magic) { | |||
| 41 | return IPSFileType::Error; | 41 | return IPSFileType::Error; |
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | constexpr static std::array<u8, 5> patch_magic{{'P', 'A', 'T', 'C', 'H'}}; | 44 | static constexpr std::array<u8, 5> patch_magic{{'P', 'A', 'T', 'C', 'H'}}; |
| 45 | if (std::equal(magic.begin(), magic.end(), patch_magic.begin())) { | 45 | if (std::equal(magic.begin(), magic.end(), patch_magic.begin())) { |
| 46 | return IPSFileType::IPS; | 46 | return IPSFileType::IPS; |
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | constexpr static std::array<u8, 5> ips32_magic{{'I', 'P', 'S', '3', '2'}}; | 49 | static constexpr std::array<u8, 5> ips32_magic{{'I', 'P', 'S', '3', '2'}}; |
| 50 | if (std::equal(magic.begin(), magic.end(), ips32_magic.begin())) { | 50 | if (std::equal(magic.begin(), magic.end(), ips32_magic.begin())) { |
| 51 | return IPSFileType::IPS32; | 51 | return IPSFileType::IPS32; |
| 52 | } | 52 | } |
| @@ -55,12 +55,12 @@ static IPSFileType IdentifyMagic(const std::vector<u8>& magic) { | |||
| 55 | } | 55 | } |
| 56 | 56 | ||
| 57 | static bool IsEOF(IPSFileType type, const std::vector<u8>& data) { | 57 | static bool IsEOF(IPSFileType type, const std::vector<u8>& data) { |
| 58 | constexpr static std::array<u8, 3> eof{{'E', 'O', 'F'}}; | 58 | static constexpr std::array<u8, 3> eof{{'E', 'O', 'F'}}; |
| 59 | if (type == IPSFileType::IPS && std::equal(data.begin(), data.end(), eof.begin())) { | 59 | if (type == IPSFileType::IPS && std::equal(data.begin(), data.end(), eof.begin())) { |
| 60 | return true; | 60 | return true; |
| 61 | } | 61 | } |
| 62 | 62 | ||
| 63 | constexpr static std::array<u8, 4> eeof{{'E', 'E', 'O', 'F'}}; | 63 | static constexpr std::array<u8, 4> eeof{{'E', 'E', 'O', 'F'}}; |
| 64 | return type == IPSFileType::IPS32 && std::equal(data.begin(), data.end(), eeof.begin()); | 64 | return type == IPSFileType::IPS32 && std::equal(data.begin(), data.end(), eeof.begin()); |
| 65 | } | 65 | } |
| 66 | 66 | ||
diff --git a/src/core/file_sys/program_metadata.cpp b/src/core/file_sys/program_metadata.cpp index cb172f574..f00479bd3 100644 --- a/src/core/file_sys/program_metadata.cpp +++ b/src/core/file_sys/program_metadata.cpp | |||
| @@ -97,7 +97,7 @@ Loader::ResultStatus ProgramMetadata::Load(VirtualFile file) { | |||
| 97 | 97 | ||
| 98 | /*static*/ ProgramMetadata ProgramMetadata::GetDefault() { | 98 | /*static*/ ProgramMetadata ProgramMetadata::GetDefault() { |
| 99 | // Allow use of cores 0~3 and thread priorities 1~63. | 99 | // Allow use of cores 0~3 and thread priorities 1~63. |
| 100 | constexpr static u32 default_thread_info_capability = 0x30007F7; | 100 | constexpr u32 default_thread_info_capability = 0x30007F7; |
| 101 | 101 | ||
| 102 | ProgramMetadata result; | 102 | ProgramMetadata result; |
| 103 | 103 | ||
diff --git a/src/core/file_sys/registered_cache.cpp b/src/core/file_sys/registered_cache.cpp index 0f1f76949..a6960170c 100644 --- a/src/core/file_sys/registered_cache.cpp +++ b/src/core/file_sys/registered_cache.cpp | |||
| @@ -71,7 +71,7 @@ static std::string GetRelativePathFromNcaID(const std::array<u8, 16>& nca_id, bo | |||
| 71 | } | 71 | } |
| 72 | 72 | ||
| 73 | static std::string GetCNMTName(TitleType type, u64 title_id) { | 73 | static std::string GetCNMTName(TitleType type, u64 title_id) { |
| 74 | constexpr static std::array<const char*, 9> TITLE_TYPE_NAMES{ | 74 | static constexpr std::array<const char*, 9> TITLE_TYPE_NAMES{ |
| 75 | "SystemProgram", | 75 | "SystemProgram", |
| 76 | "SystemData", | 76 | "SystemData", |
| 77 | "SystemUpdate", | 77 | "SystemUpdate", |