mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-11-18 06:37:32 +01:00
Merge pull request #1177 from linkmauve/fix-msvc-todo
Use a constexpr function for country initialization in service/cfg
This commit is contained in:
commit
bcaafb826e
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user