diff options
Diffstat (limited to '')
| -rw-r--r-- | src/core/hle/kernel/k_memory_region_type.h | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/src/core/hle/kernel/k_memory_region_type.h b/src/core/hle/kernel/k_memory_region_type.h index 5ea5d2ceb..a05e66677 100644 --- a/src/core/hle/kernel/k_memory_region_type.h +++ b/src/core/hle/kernel/k_memory_region_type.h | |||
| @@ -41,20 +41,9 @@ constexpr size_t BitsForDeriveDense(size_t n) { | |||
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | class KMemoryRegionTypeValue { | 43 | class KMemoryRegionTypeValue { |
| 44 | private: | ||
| 45 | using ValueType = typename std::underlying_type<KMemoryRegionType>::type; | ||
| 46 | |||
| 47 | private: | ||
| 48 | ValueType m_value{}; | ||
| 49 | size_t m_next_bit{}; | ||
| 50 | bool m_finalized{}; | ||
| 51 | bool m_sparse_only{}; | ||
| 52 | bool m_dense_only{}; | ||
| 53 | |||
| 54 | private: | ||
| 55 | constexpr KMemoryRegionTypeValue(ValueType v) : m_value(v) {} | ||
| 56 | |||
| 57 | public: | 44 | public: |
| 45 | using ValueType = std::underlying_type_t<KMemoryRegionType>; | ||
| 46 | |||
| 58 | constexpr KMemoryRegionTypeValue() = default; | 47 | constexpr KMemoryRegionTypeValue() = default; |
| 59 | 48 | ||
| 60 | constexpr operator KMemoryRegionType() const { | 49 | constexpr operator KMemoryRegionType() const { |
| @@ -139,6 +128,16 @@ public: | |||
| 139 | constexpr bool IsAncestorOf(ValueType v) const { | 128 | constexpr bool IsAncestorOf(ValueType v) const { |
| 140 | return (m_value | v) == v; | 129 | return (m_value | v) == v; |
| 141 | } | 130 | } |
| 131 | |||
| 132 | private: | ||
| 133 | constexpr KMemoryRegionTypeValue(ValueType v) : m_value(v) {} | ||
| 134 | |||
| 135 | private: | ||
| 136 | ValueType m_value{}; | ||
| 137 | size_t m_next_bit{}; | ||
| 138 | bool m_finalized{}; | ||
| 139 | bool m_sparse_only{}; | ||
| 140 | bool m_dense_only{}; | ||
| 142 | }; | 141 | }; |
| 143 | 142 | ||
| 144 | } // namespace impl | 143 | } // namespace impl |