mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	Service/CFG: Use a constexpr function for country initialization
This fixes a TODO left over from when we supported MSVC 2013.
This commit is contained in:
		
							parent
							
								
									ddfefa9007
								
							
						
					
					
						commit
						57722fb192
					
				
					 1 changed files with 3 additions and 4 deletions
				
			
		|  | @ -41,8 +41,9 @@ struct SaveConfigBlockEntry { | ||||||
|     u16 flags;          ///< The flags of the block, possibly used for access control
 |     u16 flags;          ///< The flags of the block, possibly used for access control
 | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| // TODO(Link Mauve): use a constexpr once MSVC starts supporting it.
 | static constexpr u16 C(const char code[2]) { | ||||||
| #define C(code) (u16)((code)[0] | ((code)[1] << 8)) |     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
 |     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
 |     C("SM"), C("VA"), C("BM")                                               // 184-186
 | ||||||
| }}; | }}; | ||||||
| 
 | 
 | ||||||
| #undef C |  | ||||||
| 
 |  | ||||||
| /**
 | /**
 | ||||||
|  * CFG::GetCountryCodeString service function |  * CFG::GetCountryCodeString service function | ||||||
|  *  Inputs: |  *  Inputs: | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue