Skip to content
Snippets Groups Projects
Commit 0e35f1bb authored by Lioncash's avatar Lioncash
Browse files

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 .
parent 568bcbc2
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,15 @@
#include "core/hle/kernel/thread.h"
namespace Kernel {
namespace {
constexpr u16 GetSlot(Handle handle) {
return handle >> 15;
}
constexpr u16 GetGeneration(Handle handle) {
return handle & 0x7FFF;
}
} // Anonymous namespace
HandleTable::HandleTable() {
next_generation = 1;
......
......@@ -93,13 +93,6 @@ private:
/// This is the maximum limit of handles allowed per process in Horizon
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.
std::array<SharedPtr<Object>, MAX_COUNT> objects;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment