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 .
This commit is contained in:
parent
83f6e9ea72
commit
662c3ff684
|
@ -11,6 +11,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(KernelSystem& kernel) : kernel(kernel) {
|
HandleTable::HandleTable(KernelSystem& kernel) : kernel(kernel) {
|
||||||
next_generation = 1;
|
next_generation = 1;
|
||||||
|
|
|
@ -96,13 +96,6 @@ private:
|
||||||
*/
|
*/
|
||||||
static const std::size_t MAX_COUNT = 4096;
|
static const std::size_t MAX_COUNT = 4096;
|
||||||
|
|
||||||
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;
|
||||||
|
|
||||||
|
|
Reference in New Issue