summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/cfg/cfg.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/cfg/cfg.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/core/hle/service/cfg/cfg.h b/src/core/hle/service/cfg/cfg.h
index 7b7a76b08..fc2a16a04 100644
--- a/src/core/hle/service/cfg/cfg.h
+++ b/src/core/hle/service/cfg/cfg.h
@@ -41,10 +41,11 @@ struct SaveConfigBlockEntry {
u16 flags; ///< The flags of the block, possibly used for access control
};
-// TODO(Link Mauve): use a constexpr once MSVC starts supporting it.
-#define C(code) (u16)((code)[0] | ((code)[1] << 8))
+static constexpr u16 C(const char code[2]) {
+ return code[0] | (code[1] << 8);
+}
-static const std::array<u16, 187> country_codes = {
+static const std::array<u16, 187> country_codes = {{
0, C("JP"), 0, 0, 0, 0, 0, 0, // 0-7
C("AI"), C("AG"), C("AR"), C("AW"), C("BS"), C("BB"), C("BZ"), C("BO"), // 8-15
C("BR"), C("VG"), C("CA"), C("KY"), C("CL"), C("CO"), C("CR"), C("DM"), // 16-23
@@ -69,9 +70,7 @@ static const std::array<u16, 187> country_codes = {
C("AE"), C("IN"), C("EG"), C("OM"), C("QA"), C("KW"), C("SA"), C("SY"), // 168-175
C("BH"), C("JO"), 0, 0, 0, 0, 0, 0, // 176-183
C("SM"), C("VA"), C("BM") // 184-186
-};
-
-#undef C
+}};
/**
* CFG::GetCountryCodeString service function