Prevent ObjectLock from being copied

Copying an ObjectLock results in the underlying mutex being unlocked too often.
There's also no good reason for copying a scoped locking class (if at all, it
should be moved).
This commit is contained in:
Julian Brost 2022-12-08 12:06:59 +01:00
parent ca328627cd
commit a8cc5dff89
1 changed files with 3 additions and 0 deletions

View File

@ -17,6 +17,9 @@ public:
ObjectLock(const Object::Ptr& object);
ObjectLock(const Object *object);
ObjectLock(const ObjectLock&) = delete;
ObjectLock& operator=(const ObjectLock&) = delete;
~ObjectLock();
void Lock();