From 26aee55aef18acddf2b922191cc1f5bbb7724c03 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 3 May 2020 13:34:21 -0400 Subject: 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. --- src/core/hle/kernel/memory/address_space_info.cpp | 12 ++++++------ 1 file 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) { return index < std::size(AddressSpaceInfos) && AddressSpaceInfos[index].GetAddress() != Invalid; } -constexpr std::size_t - AddressSpaceIndices32Bit[static_cast(AddressSpaceInfo::Type::Count)]{ +constexpr std::array(AddressSpaceInfo::Type::Count)> + AddressSpaceIndices32Bit{ 0, 1, 0, 2, 0, 3, }; -constexpr std::size_t - AddressSpaceIndices36Bit[static_cast(AddressSpaceInfo::Type::Count)]{ +constexpr std::array(AddressSpaceInfo::Type::Count)> + AddressSpaceIndices36Bit{ 4, 5, 4, 6, 4, 7, }; -constexpr std::size_t - AddressSpaceIndices39Bit[static_cast(AddressSpaceInfo::Type::Count)]{ +constexpr std::array(AddressSpaceInfo::Type::Count)> + AddressSpaceIndices39Bit{ 9, 8, 8, 10, 12, 11, }; -- cgit v1.2.3