Merge pull request #4735 from FearlessTobi/port-2388
Port yuzu-emu/yuzu#2388: "kernel: Make handle type declarations constexpr"
This commit is contained in:
commit
bbc8fd7165
|
@ -42,7 +42,7 @@ public:
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const HandleType HANDLE_TYPE = HandleType::AddressArbiter;
|
static constexpr HandleType HANDLE_TYPE = HandleType::AddressArbiter;
|
||||||
HandleType GetHandleType() const override {
|
HandleType GetHandleType() const override {
|
||||||
return HANDLE_TYPE;
|
return HANDLE_TYPE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ public:
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const HandleType HANDLE_TYPE = HandleType::ClientPort;
|
static constexpr HandleType HANDLE_TYPE = HandleType::ClientPort;
|
||||||
HandleType GetHandleType() const override {
|
HandleType GetHandleType() const override {
|
||||||
return HANDLE_TYPE;
|
return HANDLE_TYPE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ public:
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const HandleType HANDLE_TYPE = HandleType::ClientSession;
|
static constexpr HandleType HANDLE_TYPE = HandleType::ClientSession;
|
||||||
HandleType GetHandleType() const override {
|
HandleType GetHandleType() const override {
|
||||||
return HANDLE_TYPE;
|
return HANDLE_TYPE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ public:
|
||||||
this->name = name;
|
this->name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const HandleType HANDLE_TYPE = HandleType::Event;
|
static constexpr HandleType HANDLE_TYPE = HandleType::Event;
|
||||||
HandleType GetHandleType() const override {
|
HandleType GetHandleType() const override {
|
||||||
return HANDLE_TYPE;
|
return HANDLE_TYPE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ public:
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const HandleType HANDLE_TYPE = HandleType::Mutex;
|
static constexpr HandleType HANDLE_TYPE = HandleType::Mutex;
|
||||||
HandleType GetHandleType() const override {
|
HandleType GetHandleType() const override {
|
||||||
return HANDLE_TYPE;
|
return HANDLE_TYPE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,7 @@ public:
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const HandleType HANDLE_TYPE = HandleType::CodeSet;
|
static constexpr HandleType HANDLE_TYPE = HandleType::CodeSet;
|
||||||
HandleType GetHandleType() const override {
|
HandleType GetHandleType() const override {
|
||||||
return HANDLE_TYPE;
|
return HANDLE_TYPE;
|
||||||
}
|
}
|
||||||
|
@ -120,7 +120,7 @@ public:
|
||||||
return codeset->name;
|
return codeset->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const HandleType HANDLE_TYPE = HandleType::Process;
|
static constexpr HandleType HANDLE_TYPE = HandleType::Process;
|
||||||
HandleType GetHandleType() const override {
|
HandleType GetHandleType() const override {
|
||||||
return HANDLE_TYPE;
|
return HANDLE_TYPE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,7 @@ public:
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const HandleType HANDLE_TYPE = HandleType::ResourceLimit;
|
static constexpr HandleType HANDLE_TYPE = HandleType::ResourceLimit;
|
||||||
HandleType GetHandleType() const override {
|
HandleType GetHandleType() const override {
|
||||||
return HANDLE_TYPE;
|
return HANDLE_TYPE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ public:
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const HandleType HANDLE_TYPE = HandleType::Semaphore;
|
static constexpr HandleType HANDLE_TYPE = HandleType::Semaphore;
|
||||||
HandleType GetHandleType() const override {
|
HandleType GetHandleType() const override {
|
||||||
return HANDLE_TYPE;
|
return HANDLE_TYPE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ public:
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const HandleType HANDLE_TYPE = HandleType::ServerPort;
|
static constexpr HandleType HANDLE_TYPE = HandleType::ServerPort;
|
||||||
HandleType GetHandleType() const override {
|
HandleType GetHandleType() const override {
|
||||||
return HANDLE_TYPE;
|
return HANDLE_TYPE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,7 @@ public:
|
||||||
return "ServerSession";
|
return "ServerSession";
|
||||||
}
|
}
|
||||||
|
|
||||||
static const HandleType HANDLE_TYPE = HandleType::ServerSession;
|
static constexpr HandleType HANDLE_TYPE = HandleType::ServerSession;
|
||||||
HandleType GetHandleType() const override {
|
HandleType GetHandleType() const override {
|
||||||
return HANDLE_TYPE;
|
return HANDLE_TYPE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ public:
|
||||||
this->name = std::move(name);
|
this->name = std::move(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const HandleType HANDLE_TYPE = HandleType::SharedMemory;
|
static constexpr HandleType HANDLE_TYPE = HandleType::SharedMemory;
|
||||||
HandleType GetHandleType() const override {
|
HandleType GetHandleType() const override {
|
||||||
return HANDLE_TYPE;
|
return HANDLE_TYPE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -160,7 +160,7 @@ public:
|
||||||
return "Thread";
|
return "Thread";
|
||||||
}
|
}
|
||||||
|
|
||||||
static const HandleType HANDLE_TYPE = HandleType::Thread;
|
static constexpr HandleType HANDLE_TYPE = HandleType::Thread;
|
||||||
HandleType GetHandleType() const override {
|
HandleType GetHandleType() const override {
|
||||||
return HANDLE_TYPE;
|
return HANDLE_TYPE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,7 @@ public:
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const HandleType HANDLE_TYPE = HandleType::Timer;
|
static constexpr HandleType HANDLE_TYPE = HandleType::Timer;
|
||||||
HandleType GetHandleType() const override {
|
HandleType GetHandleType() const override {
|
||||||
return HANDLE_TYPE;
|
return HANDLE_TYPE;
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue