diff options
author | Liam <byteslice@airmail.cc> | 2022-06-08 00:19:40 +0200 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2022-06-14 02:09:00 +0200 |
commit | 8fea7e56e5061bd609a4369f6e58af97be328701 (patch) | |
tree | 8ff3f003ec0f9cc620f1ff95b7cacd753562da42 /src/core | |
parent | common: Don't test ASSERT conditions inline (diff) | |
download | yuzu-8fea7e56e5061bd609a4369f6e58af97be328701.tar yuzu-8fea7e56e5061bd609a4369f6e58af97be328701.tar.gz yuzu-8fea7e56e5061bd609a4369f6e58af97be328701.tar.bz2 yuzu-8fea7e56e5061bd609a4369f6e58af97be328701.tar.lz yuzu-8fea7e56e5061bd609a4369f6e58af97be328701.tar.xz yuzu-8fea7e56e5061bd609a4369f6e58af97be328701.tar.zst yuzu-8fea7e56e5061bd609a4369f6e58af97be328701.zip |
Diffstat (limited to 'src/core')
-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 { class KernelCore; class KProcess; -#define KERNEL_AUTOOBJECT_TRAITS(CLASS, BASE_CLASS) \ +#define KERNEL_AUTOOBJECT_TRAITS_IMPL(CLASS, BASE_CLASS, ATTRIBUTE) \ \ private: \ friend class ::Kernel::KClassTokenGenerator; \ @@ -40,16 +40,19 @@ public: static constexpr const char* GetStaticTypeName() { \ return TypeName; \ } \ - virtual TypeObj GetTypeObj() const { \ + virtual TypeObj GetTypeObj() ATTRIBUTE { \ return GetStaticTypeObj(); \ } \ - virtual const char* GetTypeName() const { \ + virtual const char* GetTypeName() ATTRIBUTE { \ return GetStaticTypeName(); \ } \ \ private: \ constexpr bool operator!=(const TypeObj& rhs) +#define KERNEL_AUTOOBJECT_TRAITS(CLASS, BASE_CLASS) \ + KERNEL_AUTOOBJECT_TRAITS_IMPL(CLASS, BASE_CLASS, const override) + class KAutoObject { protected: class TypeObj { @@ -82,7 +85,7 @@ protected: }; private: - KERNEL_AUTOOBJECT_TRAITS(KAutoObject, KAutoObject); + KERNEL_AUTOOBJECT_TRAITS_IMPL(KAutoObject, KAutoObject, const); public: explicit KAutoObject(KernelCore& kernel_) : kernel(kernel_) { |