diff options
| author | 2022-06-07 18:19:40 -0400 | |
|---|---|---|
| committer | 2022-06-13 20:09:00 -0400 | |
| commit | 8fea7e56e5061bd609a4369f6e58af97be328701 (patch) | |
| tree | 8ff3f003ec0f9cc620f1ff95b7cacd753562da42 /src | |
| parent | common: Don't test ASSERT conditions inline (diff) | |
| download | yuzu-8fea7e56e5061bd609a4369f6e58af97be328701.tar.gz yuzu-8fea7e56e5061bd609a4369f6e58af97be328701.tar.xz yuzu-8fea7e56e5061bd609a4369f6e58af97be328701.zip | |
kernel: fix inconsistency in AutoObjectTraits macro definitions
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/kernel/k_auto_object.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/core/hle/kernel/k_auto_object.h b/src/core/hle/kernel/k_auto_object.h index ea47fc600..2827763d5 100644 --- a/src/core/hle/kernel/k_auto_object.h +++ b/src/core/hle/kernel/k_auto_object.h | |||
| @@ -18,7 +18,7 @@ namespace Kernel { | |||
| 18 | class KernelCore; | 18 | class KernelCore; |
| 19 | class KProcess; | 19 | class KProcess; |
| 20 | 20 | ||
| 21 | #define KERNEL_AUTOOBJECT_TRAITS(CLASS, BASE_CLASS) \ | 21 | #define KERNEL_AUTOOBJECT_TRAITS_IMPL(CLASS, BASE_CLASS, ATTRIBUTE) \ |
| 22 | \ | 22 | \ |
| 23 | private: \ | 23 | private: \ |
| 24 | friend class ::Kernel::KClassTokenGenerator; \ | 24 | friend class ::Kernel::KClassTokenGenerator; \ |
| @@ -40,16 +40,19 @@ public: | |||
| 40 | static constexpr const char* GetStaticTypeName() { \ | 40 | static constexpr const char* GetStaticTypeName() { \ |
| 41 | return TypeName; \ | 41 | return TypeName; \ |
| 42 | } \ | 42 | } \ |
| 43 | virtual TypeObj GetTypeObj() const { \ | 43 | virtual TypeObj GetTypeObj() ATTRIBUTE { \ |
| 44 | return GetStaticTypeObj(); \ | 44 | return GetStaticTypeObj(); \ |
| 45 | } \ | 45 | } \ |
| 46 | virtual const char* GetTypeName() const { \ | 46 | virtual const char* GetTypeName() ATTRIBUTE { \ |
| 47 | return GetStaticTypeName(); \ | 47 | return GetStaticTypeName(); \ |
| 48 | } \ | 48 | } \ |
| 49 | \ | 49 | \ |
| 50 | private: \ | 50 | private: \ |
| 51 | constexpr bool operator!=(const TypeObj& rhs) | 51 | constexpr bool operator!=(const TypeObj& rhs) |
| 52 | 52 | ||
| 53 | #define KERNEL_AUTOOBJECT_TRAITS(CLASS, BASE_CLASS) \ | ||
| 54 | KERNEL_AUTOOBJECT_TRAITS_IMPL(CLASS, BASE_CLASS, const override) | ||
| 55 | |||
| 53 | class KAutoObject { | 56 | class KAutoObject { |
| 54 | protected: | 57 | protected: |
| 55 | class TypeObj { | 58 | class TypeObj { |
| @@ -82,7 +85,7 @@ protected: | |||
| 82 | }; | 85 | }; |
| 83 | 86 | ||
| 84 | private: | 87 | private: |
| 85 | KERNEL_AUTOOBJECT_TRAITS(KAutoObject, KAutoObject); | 88 | KERNEL_AUTOOBJECT_TRAITS_IMPL(KAutoObject, KAutoObject, const); |
| 86 | 89 | ||
| 87 | public: | 90 | public: |
| 88 | explicit KAutoObject(KernelCore& kernel_) : kernel(kernel_) { | 91 | explicit KAutoObject(KernelCore& kernel_) : kernel(kernel_) { |