aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/k_auto_object.h
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2022-02-02 12:12:22 -0500
committerLioncash <mathew1800@gmail.com>2022-02-02 12:17:08 -0500
commit76d83ffbece12d9509c5cc753dd6c69d8abeb458 (patch)
treed514d72b25ccea9a7405bd36e8caf7a79da4d909 /src/core/hle/kernel/k_auto_object.h
parent72add82ee99bdf43d655bf33c005da1002f0e650 (diff)
general: Move deleted copy/move constructor/assignment operators to public interface
This allows for better compiler errors, where the compiler will state a copy or move couldn't occur due to the relevant function being deleted. Previously a compiler would warn about the relevant function not being accessible (which, while true, isn't as informative as it could be).
Diffstat (limited to 'src/core/hle/kernel/k_auto_object.h')
-rw-r--r--src/core/hle/kernel/k_auto_object.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/hle/kernel/k_auto_object.h b/src/core/hle/kernel/k_auto_object.h
index 165b76747..05779f2d5 100644
--- a/src/core/hle/kernel/k_auto_object.h
+++ b/src/core/hle/kernel/k_auto_object.h
@@ -20,8 +20,6 @@ class KernelCore;
class KProcess;
#define KERNEL_AUTOOBJECT_TRAITS(CLASS, BASE_CLASS) \
- YUZU_NON_COPYABLE(CLASS); \
- YUZU_NON_MOVEABLE(CLASS); \
\
private: \
friend class ::Kernel::KClassTokenGenerator; \
@@ -32,6 +30,9 @@ private:
} \
\
public: \
+ YUZU_NON_COPYABLE(CLASS); \
+ YUZU_NON_MOVEABLE(CLASS); \
+ \
using BaseClass = BASE_CLASS; \
static constexpr TypeObj GetStaticTypeObj() { \
constexpr ClassTokenType Token = ClassToken(); \
@@ -224,9 +225,9 @@ private:
template <typename T>
class KScopedAutoObject {
+public:
YUZU_NON_COPYABLE(KScopedAutoObject);
-public:
constexpr KScopedAutoObject() = default;
constexpr KScopedAutoObject(T* o) : m_obj(o) {