diff options
author | Lioncash <mathew1800@gmail.com> | 2020-07-13 16:35:22 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2020-07-13 16:42:52 +0200 |
commit | ed0fe04b4f8a681885adaa7ad2074fbcdab1956a (patch) | |
tree | ca51bbfdede0f681a019f883ff66386282d6401d /src/core | |
parent | address_space_info: Make use of designated initializers (diff) | |
download | yuzu-ed0fe04b4f8a681885adaa7ad2074fbcdab1956a.tar yuzu-ed0fe04b4f8a681885adaa7ad2074fbcdab1956a.tar.gz yuzu-ed0fe04b4f8a681885adaa7ad2074fbcdab1956a.tar.bz2 yuzu-ed0fe04b4f8a681885adaa7ad2074fbcdab1956a.tar.lz yuzu-ed0fe04b4f8a681885adaa7ad2074fbcdab1956a.tar.xz yuzu-ed0fe04b4f8a681885adaa7ad2074fbcdab1956a.tar.zst yuzu-ed0fe04b4f8a681885adaa7ad2074fbcdab1956a.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/hle/kernel/memory/address_space_info.cpp | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/src/core/hle/kernel/memory/address_space_info.cpp b/src/core/hle/kernel/memory/address_space_info.cpp index 6f7f1614b..e4288cab4 100644 --- a/src/core/hle/kernel/memory/address_space_info.cpp +++ b/src/core/hle/kernel/memory/address_space_info.cpp @@ -49,20 +49,19 @@ constexpr bool IsAllowedIndexForAddress(std::size_t index) { return index < AddressSpaceInfos.size() && AddressSpaceInfos[index].address != Invalid; } -constexpr std::array<std::size_t, static_cast<std::size_t>(AddressSpaceInfo::Type::Count)> - AddressSpaceIndices32Bit{ - 0, 1, 0, 2, 0, 3, - }; - -constexpr std::array<std::size_t, static_cast<std::size_t>(AddressSpaceInfo::Type::Count)> - AddressSpaceIndices36Bit{ - 4, 5, 4, 6, 4, 7, - }; - -constexpr std::array<std::size_t, static_cast<std::size_t>(AddressSpaceInfo::Type::Count)> - AddressSpaceIndices39Bit{ - 9, 8, 8, 10, 12, 11, - }; +using IndexArray = std::array<std::size_t, static_cast<std::size_t>(AddressSpaceInfo::Type::Count)>; + +constexpr IndexArray AddressSpaceIndices32Bit{ + 0, 1, 0, 2, 0, 3, +}; + +constexpr IndexArray AddressSpaceIndices36Bit{ + 4, 5, 4, 6, 4, 7, +}; + +constexpr IndexArray AddressSpaceIndices39Bit{ + 9, 8, 8, 10, 12, 11, +}; constexpr bool IsAllowed32BitType(AddressSpaceInfo::Type type) { return type < AddressSpaceInfo::Type::Count && type != AddressSpaceInfo::Type::Large64Bit && |