mirror of
				https://git.zaroz.cloud/nintendo-back-up/yuzu/yuzu-mainline.git
				synced 2025-03-21 01:53:15 +00:00 
			
		
		
		
	kernel/memory: Make use of std::array consistently in address_space_info
This allows tuning standard library implementations to enable or disable range checks at runtime, which is nicer for debugging.
This commit is contained in:
		
							parent
							
								
									dfa582169b
								
							
						
					
					
						commit
						26aee55aef
					
				| @ -49,18 +49,18 @@ constexpr bool IsAllowedIndexForAddress(std::size_t index) { | |||||||
|     return index < std::size(AddressSpaceInfos) && AddressSpaceInfos[index].GetAddress() != Invalid; |     return index < std::size(AddressSpaceInfos) && AddressSpaceInfos[index].GetAddress() != Invalid; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| constexpr std::size_t | constexpr std::array<std::size_t, static_cast<std::size_t>(AddressSpaceInfo::Type::Count)> | ||||||
|     AddressSpaceIndices32Bit[static_cast<std::size_t>(AddressSpaceInfo::Type::Count)]{ |     AddressSpaceIndices32Bit{ | ||||||
|         0, 1, 0, 2, 0, 3, |         0, 1, 0, 2, 0, 3, | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
| constexpr std::size_t | constexpr std::array<std::size_t, static_cast<std::size_t>(AddressSpaceInfo::Type::Count)> | ||||||
|     AddressSpaceIndices36Bit[static_cast<std::size_t>(AddressSpaceInfo::Type::Count)]{ |     AddressSpaceIndices36Bit{ | ||||||
|         4, 5, 4, 6, 4, 7, |         4, 5, 4, 6, 4, 7, | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
| constexpr std::size_t | constexpr std::array<std::size_t, static_cast<std::size_t>(AddressSpaceInfo::Type::Count)> | ||||||
|     AddressSpaceIndices39Bit[static_cast<std::size_t>(AddressSpaceInfo::Type::Count)]{ |     AddressSpaceIndices39Bit{ | ||||||
|         9, 8, 8, 10, 12, 11, |         9, 8, 8, 10, 12, 11, | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Lioncash
						Lioncash