From 4569f39c7c1e3d7ce010f0b120e1f45dbba17b1c Mon Sep 17 00:00:00 2001 From: Wunkolo Date: Wed, 23 Jun 2021 14:18:27 -0700 Subject: common: Replace common_sizes into user-literals Removes common_sizes.h in favor of having `_KiB`, `_MiB`, `_GiB`, etc user-literals within literals.h. To keep the global namespace clean, users will have to use: ``` using namespace Common::Literals; ``` to access these literals. --- src/core/hle/kernel/k_page_table.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/core/hle/kernel/k_page_table.cpp') diff --git a/src/core/hle/kernel/k_page_table.cpp b/src/core/hle/kernel/k_page_table.cpp index 66d260635..701268545 100644 --- a/src/core/hle/kernel/k_page_table.cpp +++ b/src/core/hle/kernel/k_page_table.cpp @@ -4,6 +4,7 @@ #include "common/alignment.h" #include "common/assert.h" +#include "common/literals.h" #include "common/scope_exit.h" #include "core/core.h" #include "core/hle/kernel/k_address_space_info.h" @@ -23,6 +24,8 @@ namespace Kernel { namespace { +using namespace Common::Literals; + constexpr std::size_t GetAddressSpaceWidthFromType(FileSys::ProgramAddressSpaceType as_type) { switch (as_type) { case FileSys::ProgramAddressSpaceType::Is32Bit: @@ -89,7 +92,7 @@ ResultCode KPageTable::InitializeForProcess(FileSys::ProgramAddressSpaceType as_ } // Set code regions and determine remaining - constexpr std::size_t RegionAlignment{2 * 1024 * 1024}; + constexpr std::size_t RegionAlignment{2_MiB}; VAddr process_code_start{}; VAddr process_code_end{}; std::size_t stack_region_size{}; -- cgit v1.2.3