From ffcaf5af9019eb73a5d31b17e56521c49a82dffd Mon Sep 17 00:00:00 2001 From: bunnei Date: Fri, 14 Jan 2022 23:26:04 -0800 Subject: [PATCH] core: hle: kernel: KPageTable: SetMemoryAttribute: Various cleanup. --- src/core/hle/kernel/k_page_table.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/hle/kernel/k_page_table.cpp b/src/core/hle/kernel/k_page_table.cpp index 2f8abcbcf..45d487004 100644 --- a/src/core/hle/kernel/k_page_table.cpp +++ b/src/core/hle/kernel/k_page_table.cpp @@ -860,8 +860,9 @@ ResultCode KPageTable::SetMemoryAttribute(VAddr addr, std::size_t size, u32 mask AttributeTestMask, KMemoryAttribute::None, ~AttributeTestMask)); // Determine the new attribute. - const auto new_attr = ((old_attr & static_cast(~mask)) | - static_cast(attr & mask)); + const KMemoryAttribute new_attr = + static_cast(((old_attr & static_cast(~mask)) | + static_cast(attr & mask))); // Perform operation. this->Operate(addr, num_pages, old_perm, OperationType::ChangePermissionsAndRefresh);