mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
Prevent accidentally copy/move of refcounted objects
This commit is contained in:
@@ -273,9 +273,7 @@ public:
|
||||
void grab() noexcept { ++m_refcount; }
|
||||
void drop() noexcept { if (--m_refcount == 0) delete this; }
|
||||
|
||||
// Preserve own reference count.
|
||||
IntrusiveReferenceCounted(const IntrusiveReferenceCounted &) {}
|
||||
IntrusiveReferenceCounted &operator=(const IntrusiveReferenceCounted &) { return *this; }
|
||||
DISABLE_CLASS_COPY(IntrusiveReferenceCounted)
|
||||
private:
|
||||
u32 m_refcount = 1;
|
||||
};
|
||||
|
Reference in New Issue
Block a user