mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-15 09:40:06 +00:00
Kernel: Updated several member functions to be const
This commit is contained in:
parent
0deeda54ee
commit
8cac527c94
@ -16,10 +16,10 @@ namespace Kernel {
|
||||
|
||||
class Event : public Object {
|
||||
public:
|
||||
const char* GetTypeName() { return "Event"; }
|
||||
const char* GetName() { return name.c_str(); }
|
||||
const char* GetTypeName() const { return "Event"; }
|
||||
const char* GetName() const { return name.c_str(); }
|
||||
|
||||
static Kernel::HandleType GetStaticHandleType() { return Kernel::HandleType::Event; }
|
||||
static Kernel::HandleType GetStaticHandleType() { return Kernel::HandleType::Event; }
|
||||
Kernel::HandleType GetHandleType() const { return Kernel::HandleType::Event; }
|
||||
|
||||
ResetType intitial_reset_type; ///< ResetType specified at Event initialization
|
||||
|
@ -44,8 +44,8 @@ class Object : NonCopyable {
|
||||
public:
|
||||
virtual ~Object() {}
|
||||
Handle GetHandle() const { return handle; }
|
||||
virtual const char* GetTypeName() { return "[BAD KERNEL OBJECT TYPE]"; }
|
||||
virtual const char* GetName() { return "[UNKNOWN KERNEL OBJECT]"; }
|
||||
virtual const char* GetTypeName() const { return "[BAD KERNEL OBJECT TYPE]"; }
|
||||
virtual const char* GetName() const { return "[UNKNOWN KERNEL OBJECT]"; }
|
||||
virtual Kernel::HandleType GetHandleType() const = 0;
|
||||
|
||||
/**
|
||||
|
@ -15,10 +15,10 @@ namespace Kernel {
|
||||
|
||||
class Mutex : public Object {
|
||||
public:
|
||||
const char* GetTypeName() { return "Mutex"; }
|
||||
const char* GetName() { return name.c_str(); }
|
||||
const char* GetTypeName() const { return "Mutex"; }
|
||||
const char* GetName() const { return name.c_str(); }
|
||||
|
||||
static Kernel::HandleType GetStaticHandleType() { return Kernel::HandleType::Mutex; }
|
||||
static Kernel::HandleType GetStaticHandleType() { return Kernel::HandleType::Mutex; }
|
||||
Kernel::HandleType GetHandleType() const { return Kernel::HandleType::Mutex; }
|
||||
|
||||
bool initial_locked; ///< Initial lock state when mutex was created
|
||||
|
@ -25,10 +25,10 @@ namespace Kernel {
|
||||
class Thread : public Kernel::Object {
|
||||
public:
|
||||
|
||||
const char* GetName() { return name; }
|
||||
const char* GetTypeName() { return "Thread"; }
|
||||
const char* GetName() const { return name; }
|
||||
const char* GetTypeName() const { return "Thread"; }
|
||||
|
||||
static Kernel::HandleType GetStaticHandleType() { return Kernel::HandleType::Thread; }
|
||||
static Kernel::HandleType GetStaticHandleType() { return Kernel::HandleType::Thread; }
|
||||
Kernel::HandleType GetHandleType() const { return Kernel::HandleType::Thread; }
|
||||
|
||||
inline bool IsRunning() const { return (status & THREADSTATUS_RUNNING) != 0; }
|
||||
|
@ -39,8 +39,8 @@ class Interface : public Kernel::Object {
|
||||
friend class Manager;
|
||||
public:
|
||||
|
||||
const char *GetName() { return GetPortName(); }
|
||||
const char *GetTypeName() { return GetPortName(); }
|
||||
const char *GetName() const { return GetPortName(); }
|
||||
const char *GetTypeName() const { return GetPortName(); }
|
||||
|
||||
static Kernel::HandleType GetStaticHandleType() { return Kernel::HandleType::Service; }
|
||||
Kernel::HandleType GetHandleType() const { return Kernel::HandleType::Service; }
|
||||
|
Loading…
Reference in New Issue
Block a user