diff options
| author | 2020-05-03 13:34:21 -0400 | |
|---|---|---|
| committer | 2020-05-03 13:34:24 -0400 | |
| commit | 26aee55aef18acddf2b922191cc1f5bbb7724c03 (patch) | |
| tree | 78fbd9efa5d6f26791984feaf1f483e8d009848b | |
| parent | kernel/memory: Resolve -Wshadow warnings (diff) | |
| download | yuzu-26aee55aef18acddf2b922191cc1f5bbb7724c03.tar.gz yuzu-26aee55aef18acddf2b922191cc1f5bbb7724c03.tar.xz yuzu-26aee55aef18acddf2b922191cc1f5bbb7724c03.zip | |
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.
| -rw-r--r-- | src/core/hle/kernel/memory/address_space_info.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/hle/kernel/memory/address_space_info.cpp b/src/core/hle/kernel/memory/address_space_info.cpp index 27fae05e7..ca226e885 100644 --- a/src/core/hle/kernel/memory/address_space_info.cpp +++ b/src/core/hle/kernel/memory/address_space_info.cpp | |||
| @@ -49,18 +49,18 @@ constexpr bool IsAllowedIndexForAddress(std::size_t index) { | |||
| 49 | return index < std::size(AddressSpaceInfos) && AddressSpaceInfos[index].GetAddress() != Invalid; | 49 | return index < std::size(AddressSpaceInfos) && AddressSpaceInfos[index].GetAddress() != Invalid; |
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | constexpr std::size_t | 52 | constexpr std::array<std::size_t, static_cast<std::size_t>(AddressSpaceInfo::Type::Count)> |
| 53 | AddressSpaceIndices32Bit[static_cast<std::size_t>(AddressSpaceInfo::Type::Count)]{ | 53 | AddressSpaceIndices32Bit{ |
| 54 | 0, 1, 0, 2, 0, 3, | 54 | 0, 1, 0, 2, 0, 3, |
| 55 | }; | 55 | }; |
| 56 | 56 | ||
| 57 | constexpr std::size_t | 57 | constexpr std::array<std::size_t, static_cast<std::size_t>(AddressSpaceInfo::Type::Count)> |
| 58 | AddressSpaceIndices36Bit[static_cast<std::size_t>(AddressSpaceInfo::Type::Count)]{ | 58 | AddressSpaceIndices36Bit{ |
| 59 | 4, 5, 4, 6, 4, 7, | 59 | 4, 5, 4, 6, 4, 7, |
| 60 | }; | 60 | }; |
| 61 | 61 | ||
| 62 | constexpr std::size_t | 62 | constexpr std::array<std::size_t, static_cast<std::size_t>(AddressSpaceInfo::Type::Count)> |
| 63 | AddressSpaceIndices39Bit[static_cast<std::size_t>(AddressSpaceInfo::Type::Count)]{ | 63 | AddressSpaceIndices39Bit{ |
| 64 | 9, 8, 8, 10, 12, 11, | 64 | 9, 8, 8, 10, 12, 11, |
| 65 | }; | 65 | }; |
| 66 | 66 | ||