summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2015-09-30 17:06:47 +0200
committerbunnei <bunneidev@gmail.com>2015-09-30 17:06:47 +0200
commitbcaafb826eb666e1e883158a531d28c3b4c7f13d (patch)
treeb41935aeb11e3c188b1910ba1855354d5ad641f7
parentMerge pull request #1178 from lioncash/fmt (diff)
parentService/CFG: Use a constexpr function for country initialization (diff)
downloadyuzu-bcaafb826eb666e1e883158a531d28c3b4c7f13d.tar
yuzu-bcaafb826eb666e1e883158a531d28c3b4c7f13d.tar.gz
yuzu-bcaafb826eb666e1e883158a531d28c3b4c7f13d.tar.bz2
yuzu-bcaafb826eb666e1e883158a531d28c3b4c7f13d.tar.lz
yuzu-bcaafb826eb666e1e883158a531d28c3b4c7f13d.tar.xz
yuzu-bcaafb826eb666e1e883158a531d28c3b4c7f13d.tar.zst
yuzu-bcaafb826eb666e1e883158a531d28c3b4c7f13d.zip
-rw-r--r--src/core/hle/service/cfg/cfg.h7
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 {
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 = {{
0, C("JP"), 0, 0, 0, 0, 0, 0, // 0-7
@@ -71,8 +72,6 @@ static const std::array<u16, 187> country_codes = {{
C("SM"), C("VA"), C("BM") // 184-186
}};
-#undef C
-
/**
* CFG::GetCountryCodeString service function
* Inputs: