mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-12 16:15:20 +02:00
Prevent accidentally copy/move of refcounted objects
This commit is contained in:
@@ -51,6 +51,10 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
// Reference counted objects can be neither copied nor moved.
|
||||
IReferenceCounted(const IReferenceCounted &) = delete;
|
||||
IReferenceCounted &operator=(const IReferenceCounted &) = delete;
|
||||
|
||||
//! Grabs the object. Increments the reference counter by one.
|
||||
/** Someone who calls grab() to an object, should later also
|
||||
call drop() to it. If an object never gets as much drop() as
|
||||
|
Reference in New Issue
Block a user