citra-emu
/
citra
Archived
1
0
Fork 0

kernel: Make handle type declarations constexpr

Some objects declare their handle type as const, while others declare it
as constexpr. This makes the const ones constexpr for consistency, and
prevent unexpected compilation errors if these happen to be attempted to be
used within a constexpr context.
This commit is contained in:
Lioncash 2019-04-11 16:30:52 -04:00 committed by fearlessTobi
parent 11754778bb
commit c4c644b285
13 changed files with 14 additions and 14 deletions

View File

@ -42,7 +42,7 @@ public:
return name;
}
static const HandleType HANDLE_TYPE = HandleType::AddressArbiter;
static constexpr HandleType HANDLE_TYPE = HandleType::AddressArbiter;
HandleType GetHandleType() const override {
return HANDLE_TYPE;
}

View File

@ -28,7 +28,7 @@ public:
return name;
}
static const HandleType HANDLE_TYPE = HandleType::ClientPort;
static constexpr HandleType HANDLE_TYPE = HandleType::ClientPort;
HandleType GetHandleType() const override {
return HANDLE_TYPE;
}

View File

@ -30,7 +30,7 @@ public:
return name;
}
static const HandleType HANDLE_TYPE = HandleType::ClientSession;
static constexpr HandleType HANDLE_TYPE = HandleType::ClientSession;
HandleType GetHandleType() const override {
return HANDLE_TYPE;
}

View File

@ -25,7 +25,7 @@ public:
this->name = name;
}
static const HandleType HANDLE_TYPE = HandleType::Event;
static constexpr HandleType HANDLE_TYPE = HandleType::Event;
HandleType GetHandleType() const override {
return HANDLE_TYPE;
}

View File

@ -27,7 +27,7 @@ public:
return name;
}
static const HandleType HANDLE_TYPE = HandleType::Mutex;
static constexpr HandleType HANDLE_TYPE = HandleType::Mutex;
HandleType GetHandleType() const override {
return HANDLE_TYPE;
}

View File

@ -68,7 +68,7 @@ public:
return name;
}
static const HandleType HANDLE_TYPE = HandleType::CodeSet;
static constexpr HandleType HANDLE_TYPE = HandleType::CodeSet;
HandleType GetHandleType() const override {
return HANDLE_TYPE;
}
@ -120,7 +120,7 @@ public:
return codeset->name;
}
static const HandleType HANDLE_TYPE = HandleType::Process;
static constexpr HandleType HANDLE_TYPE = HandleType::Process;
HandleType GetHandleType() const override {
return HANDLE_TYPE;
}

View File

@ -49,7 +49,7 @@ public:
return name;
}
static const HandleType HANDLE_TYPE = HandleType::ResourceLimit;
static constexpr HandleType HANDLE_TYPE = HandleType::ResourceLimit;
HandleType GetHandleType() const override {
return HANDLE_TYPE;
}

View File

@ -25,7 +25,7 @@ public:
return name;
}
static const HandleType HANDLE_TYPE = HandleType::Semaphore;
static constexpr HandleType HANDLE_TYPE = HandleType::Semaphore;
HandleType GetHandleType() const override {
return HANDLE_TYPE;
}

View File

@ -30,7 +30,7 @@ public:
return name;
}
static const HandleType HANDLE_TYPE = HandleType::ServerPort;
static constexpr HandleType HANDLE_TYPE = HandleType::ServerPort;
HandleType GetHandleType() const override {
return HANDLE_TYPE;
}

View File

@ -47,7 +47,7 @@ public:
return "ServerSession";
}
static const HandleType HANDLE_TYPE = HandleType::ServerSession;
static constexpr HandleType HANDLE_TYPE = HandleType::ServerSession;
HandleType GetHandleType() const override {
return HANDLE_TYPE;
}

View File

@ -28,7 +28,7 @@ public:
this->name = std::move(name);
}
static const HandleType HANDLE_TYPE = HandleType::SharedMemory;
static constexpr HandleType HANDLE_TYPE = HandleType::SharedMemory;
HandleType GetHandleType() const override {
return HANDLE_TYPE;
}

View File

@ -160,7 +160,7 @@ public:
return "Thread";
}
static const HandleType HANDLE_TYPE = HandleType::Thread;
static constexpr HandleType HANDLE_TYPE = HandleType::Thread;
HandleType GetHandleType() const override {
return HANDLE_TYPE;
}

View File

@ -47,7 +47,7 @@ public:
return name;
}
static const HandleType HANDLE_TYPE = HandleType::Timer;
static constexpr HandleType HANDLE_TYPE = HandleType::Timer;
HandleType GetHandleType() const override {
return HANDLE_TYPE;
}