diff options
author | bunnei <bunneidev@gmail.com> | 2021-03-21 23:53:21 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2021-03-21 23:53:21 +0100 |
commit | 1d78190843e64577810bfd8a33b80256de28f2bc (patch) | |
tree | f509d1a5cde5a76d8a93161df626a72ce38a01f5 /src/core/hle/kernel/k_memory_region_type.h | |
parent | hle: kernel: Remove unused variable. (diff) | |
download | yuzu-1d78190843e64577810bfd8a33b80256de28f2bc.tar yuzu-1d78190843e64577810bfd8a33b80256de28f2bc.tar.gz yuzu-1d78190843e64577810bfd8a33b80256de28f2bc.tar.bz2 yuzu-1d78190843e64577810bfd8a33b80256de28f2bc.tar.lz yuzu-1d78190843e64577810bfd8a33b80256de28f2bc.tar.xz yuzu-1d78190843e64577810bfd8a33b80256de28f2bc.tar.zst yuzu-1d78190843e64577810bfd8a33b80256de28f2bc.zip |
Diffstat (limited to 'src/core/hle/kernel/k_memory_region_type.h')
-rw-r--r-- | src/core/hle/kernel/k_memory_region_type.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/core/hle/kernel/k_memory_region_type.h b/src/core/hle/kernel/k_memory_region_type.h index cf2653d28..5ea5d2ceb 100644 --- a/src/core/hle/kernel/k_memory_region_type.h +++ b/src/core/hle/kernel/k_memory_region_type.h @@ -13,9 +13,7 @@ namespace Kernel { -enum KMemoryRegionType : u32 {}; - -enum KMemoryRegionAttr : typename std::underlying_type<KMemoryRegionType>::type { +enum KMemoryRegionType : u32 { KMemoryRegionAttr_CarveoutProtected = 0x04000000, KMemoryRegionAttr_DidKernelMap = 0x08000000, KMemoryRegionAttr_ShouldKernelMap = 0x10000000, @@ -23,7 +21,7 @@ enum KMemoryRegionAttr : typename std::underlying_type<KMemoryRegionType>::type KMemoryRegionAttr_NoUserMap = 0x40000000, KMemoryRegionAttr_LinearMapped = 0x80000000, }; -DECLARE_ENUM_FLAG_OPERATORS(KMemoryRegionAttr); +DECLARE_ENUM_FLAG_OPERATORS(KMemoryRegionType); namespace impl { @@ -82,8 +80,8 @@ public: return *this; } - constexpr KMemoryRegionTypeValue& SetAttribute(KMemoryRegionAttr attr) { - m_value |= static_cast<u32>(attr); + constexpr KMemoryRegionTypeValue& SetAttribute(u32 attr) { + m_value |= attr; return *this; } @@ -95,9 +93,9 @@ public: return new_type; } - constexpr KMemoryRegionTypeValue DeriveAttribute(KMemoryRegionAttr attr) const { + constexpr KMemoryRegionTypeValue DeriveAttribute(u32 attr) const { KMemoryRegionTypeValue new_type = *this; - new_type.m_value |= static_cast<u32>(attr); + new_type.m_value |= attr; return new_type; } |