mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
kernel: fix inconsistency in AutoObjectTraits macro definitions
This commit is contained in:
parent
58fea44eb5
commit
8fea7e56e5
1 changed files with 7 additions and 4 deletions
|
@ -18,7 +18,7 @@ namespace Kernel {
|
||||||
class KernelCore;
|
class KernelCore;
|
||||||
class KProcess;
|
class KProcess;
|
||||||
|
|
||||||
#define KERNEL_AUTOOBJECT_TRAITS(CLASS, BASE_CLASS) \
|
#define KERNEL_AUTOOBJECT_TRAITS_IMPL(CLASS, BASE_CLASS, ATTRIBUTE) \
|
||||||
\
|
\
|
||||||
private: \
|
private: \
|
||||||
friend class ::Kernel::KClassTokenGenerator; \
|
friend class ::Kernel::KClassTokenGenerator; \
|
||||||
|
@ -40,16 +40,19 @@ public:
|
||||||
static constexpr const char* GetStaticTypeName() { \
|
static constexpr const char* GetStaticTypeName() { \
|
||||||
return TypeName; \
|
return TypeName; \
|
||||||
} \
|
} \
|
||||||
virtual TypeObj GetTypeObj() const { \
|
virtual TypeObj GetTypeObj() ATTRIBUTE { \
|
||||||
return GetStaticTypeObj(); \
|
return GetStaticTypeObj(); \
|
||||||
} \
|
} \
|
||||||
virtual const char* GetTypeName() const { \
|
virtual const char* GetTypeName() ATTRIBUTE { \
|
||||||
return GetStaticTypeName(); \
|
return GetStaticTypeName(); \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
private: \
|
private: \
|
||||||
constexpr bool operator!=(const TypeObj& rhs)
|
constexpr bool operator!=(const TypeObj& rhs)
|
||||||
|
|
||||||
|
#define KERNEL_AUTOOBJECT_TRAITS(CLASS, BASE_CLASS) \
|
||||||
|
KERNEL_AUTOOBJECT_TRAITS_IMPL(CLASS, BASE_CLASS, const override)
|
||||||
|
|
||||||
class KAutoObject {
|
class KAutoObject {
|
||||||
protected:
|
protected:
|
||||||
class TypeObj {
|
class TypeObj {
|
||||||
|
@ -82,7 +85,7 @@ protected:
|
||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
KERNEL_AUTOOBJECT_TRAITS(KAutoObject, KAutoObject);
|
KERNEL_AUTOOBJECT_TRAITS_IMPL(KAutoObject, KAutoObject, const);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit KAutoObject(KernelCore& kernel_) : kernel(kernel_) {
|
explicit KAutoObject(KernelCore& kernel_) : kernel(kernel_) {
|
||||||
|
|
Loading…
Reference in a new issue