فهرست منبع

kernel/handle_table: Move private static functions into the cpp file

These don't depend on class state, and are effectively implementation
details, so they can go into the cpp file .
Lioncash 7 سال پیش
والد
کامیت
0e35f1bb18
2فایلهای تغییر یافته به همراه9 افزوده شده و 7 حذف شده
  1. 9 0
      src/core/hle/kernel/handle_table.cpp
  2. 0 7
      src/core/hle/kernel/handle_table.h

+ 9 - 0
src/core/hle/kernel/handle_table.cpp

@@ -12,6 +12,15 @@
 #include "core/hle/kernel/thread.h"
 #include "core/hle/kernel/thread.h"
 
 
 namespace Kernel {
 namespace Kernel {
+namespace {
+constexpr u16 GetSlot(Handle handle) {
+    return handle >> 15;
+}
+
+constexpr u16 GetGeneration(Handle handle) {
+    return handle & 0x7FFF;
+}
+} // Anonymous namespace
 
 
 HandleTable::HandleTable() {
 HandleTable::HandleTable() {
     next_generation = 1;
     next_generation = 1;

+ 0 - 7
src/core/hle/kernel/handle_table.h

@@ -93,13 +93,6 @@ private:
     /// This is the maximum limit of handles allowed per process in Horizon
     /// This is the maximum limit of handles allowed per process in Horizon
     static constexpr std::size_t MAX_COUNT = 1024;
     static constexpr std::size_t MAX_COUNT = 1024;
 
 
-    static u16 GetSlot(Handle handle) {
-        return handle >> 15;
-    }
-    static u16 GetGeneration(Handle handle) {
-        return handle & 0x7FFF;
-    }
-
     /// Stores the Object referenced by the handle or null if the slot is empty.
     /// Stores the Object referenced by the handle or null if the slot is empty.
     std::array<SharedPtr<Object>, MAX_COUNT> objects;
     std::array<SharedPtr<Object>, MAX_COUNT> objects;