From 30a7184205b0cbf2dfc49ed3a52543219008dc32 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Thu, 11 Dec 2025 11:05:21 +0100 Subject: chore: Refs container fixes. Signed-off-by: Amlal El Mahrouss --- include/CompilerKit/Ref.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/CompilerKit/Ref.h b/include/CompilerKit/Ref.h index 618a90a..d9b0593 100644 --- a/include/CompilerKit/Ref.h +++ b/include/CompilerKit/Ref.h @@ -28,7 +28,8 @@ class StrongRef { } } - NECTI_COPY_DEFAULT(StrongRef) + NECTI_COPY_DELETE(StrongRef) + NECTI_MOVE_DEFAULT(StrongRef) using Type = T; @@ -52,7 +53,7 @@ class StrongRef { bool IsStrong() const { return m_Strong; } - explicit operator bool() { return *m_Class; } + explicit operator bool() { return m_Class != nullptr; } private: Type* m_Class{nullptr}; @@ -67,6 +68,7 @@ class WeakRef final : StrongRef { ~WeakRef() = default; NECTI_COPY_DELETE(WeakRef) + NECTI_MOVE_DEFAULT(WeakRef) public: using Type = T; -- cgit v1.2.3