From 45e13b03f372230dbf780f3fa87dd88f388af605 Mon Sep 17 00:00:00 2001 From: arades79 Date: Sat, 11 Feb 2023 13:28:03 -0500 Subject: add static lifetime to constexpr values to force compile time evaluation where possible Signed-off-by: arades79 --- src/core/hle/kernel/k_memory_manager.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/core/hle/kernel/k_memory_manager.h') diff --git a/src/core/hle/kernel/k_memory_manager.h b/src/core/hle/kernel/k_memory_manager.h index 401d4e644..d13549b5e 100644 --- a/src/core/hle/kernel/k_memory_manager.h +++ b/src/core/hle/kernel/k_memory_manager.h @@ -121,7 +121,7 @@ public: } size_t GetSize(Pool pool) { - constexpr Direction GetSizeDirection = Direction::FromFront; + constexpr static Direction GetSizeDirection = Direction::FromFront; size_t total = 0; for (auto* manager = this->GetFirstManager(pool, GetSizeDirection); manager != nullptr; manager = this->GetNextManager(manager, GetSizeDirection)) { @@ -142,7 +142,7 @@ public: size_t GetFreeSize(Pool pool) { KScopedLightLock lk(m_pool_locks[static_cast(pool)]); - constexpr Direction GetSizeDirection = Direction::FromFront; + constexpr static Direction GetSizeDirection = Direction::FromFront; size_t total = 0; for (auto* manager = this->GetFirstManager(pool, GetSizeDirection); manager != nullptr; manager = this->GetNextManager(manager, GetSizeDirection)) { @@ -154,7 +154,7 @@ public: void DumpFreeList(Pool pool) { KScopedLightLock lk(m_pool_locks[static_cast(pool)]); - constexpr Direction DumpDirection = Direction::FromFront; + constexpr static Direction DumpDirection = Direction::FromFront; for (auto* manager = this->GetFirstManager(pool, DumpDirection); manager != nullptr; manager = this->GetNextManager(manager, DumpDirection)) { manager->DumpFreeList(); -- cgit v1.2.3