diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/cfg/cfg.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/hle/service/cfg/cfg.h b/src/core/hle/service/cfg/cfg.h index 231528fd6..fc2a16a04 100644 --- a/src/core/hle/service/cfg/cfg.h +++ b/src/core/hle/service/cfg/cfg.h | |||
| @@ -41,8 +41,9 @@ struct SaveConfigBlockEntry { | |||
| 41 | u16 flags; ///< The flags of the block, possibly used for access control | 41 | u16 flags; ///< The flags of the block, possibly used for access control |
| 42 | }; | 42 | }; |
| 43 | 43 | ||
| 44 | // TODO(Link Mauve): use a constexpr once MSVC starts supporting it. | 44 | static constexpr u16 C(const char code[2]) { |
| 45 | #define C(code) (u16)((code)[0] | ((code)[1] << 8)) | 45 | return code[0] | (code[1] << 8); |
| 46 | } | ||
| 46 | 47 | ||
| 47 | static const std::array<u16, 187> country_codes = {{ | 48 | static const std::array<u16, 187> country_codes = {{ |
| 48 | 0, C("JP"), 0, 0, 0, 0, 0, 0, // 0-7 | 49 | 0, C("JP"), 0, 0, 0, 0, 0, 0, // 0-7 |
| @@ -71,8 +72,6 @@ static const std::array<u16, 187> country_codes = {{ | |||
| 71 | C("SM"), C("VA"), C("BM") // 184-186 | 72 | C("SM"), C("VA"), C("BM") // 184-186 |
| 72 | }}; | 73 | }}; |
| 73 | 74 | ||
| 74 | #undef C | ||
| 75 | |||
| 76 | /** | 75 | /** |
| 77 | * CFG::GetCountryCodeString service function | 76 | * CFG::GetCountryCodeString service function |
| 78 | * Inputs: | 77 | * Inputs: |