VERY experimental Nintendo Switch 2 emulator
C++
kernel: Make some functions const
Lioncash9b68d5e07416
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cppindex 018000abdd..2954f9913c 100644--- a/src/core/hle/kernel/kernel.cpp+++ b/src/core/hle/kernel/kernel.cpp@@ -37,7 +37,7 @@ Handle ObjectPool::Create(Object* obj, int range_bottom, int range_top) {return 0;}-bool ObjectPool::IsValid(Handle handle) {+bool ObjectPool::IsValid(Handle handle) const {int index = handle - HANDLE_OFFSET;if (index < 0)return false;@@ -75,7 +75,7 @@ void ObjectPool::List() {}}-int ObjectPool::GetCount() {+int ObjectPool::GetCount() const {int count = 0;for (int i = 0; i < MAX_COUNT; i++) {if (occupied[i])diff --git a/src/core/hle/kernel/kernel.h b/src/core/hle/kernel/kernel.hindex 8d3937ce8a..00a2228bfc 100644--- a/src/core/hle/kernel/kernel.h+++ b/src/core/hle/kernel/kernel.h@@ -86,7 +86,7 @@ public:}}- bool IsValid(Handle handle);+ bool IsValid(Handle handle) const;template <class T>T* Get(Handle handle) {@@ -142,7 +142,7 @@ public:Object* &operator [](Handle handle);void List();void Clear();- int GetCount();+ int GetCount() const;private: