libcamera: base: object,thread: Disable copy/move
Objects of type `Object` and `Thread` have address identities, so they should not be just moved/copied. And the special member functions generated by the compiler do not do the right thing. So delete them. Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
2ae569dad2
commit
9a7fce1b51
2 changed files with 6 additions and 0 deletions
|
@ -12,6 +12,7 @@
|
|||
#include <vector>
|
||||
|
||||
#include <libcamera/base/bound_method.h>
|
||||
#include <libcamera/base/class.h>
|
||||
|
||||
namespace libcamera {
|
||||
|
||||
|
@ -52,6 +53,8 @@ protected:
|
|||
bool assertThreadBound(const char *message);
|
||||
|
||||
private:
|
||||
LIBCAMERA_DISABLE_COPY_AND_MOVE(Object)
|
||||
|
||||
friend class SignalBase;
|
||||
friend class Thread;
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
#include <libcamera/base/private.h>
|
||||
|
||||
#include <libcamera/base/class.h>
|
||||
#include <libcamera/base/message.h>
|
||||
#include <libcamera/base/signal.h>
|
||||
#include <libcamera/base/span.h>
|
||||
|
@ -54,6 +55,8 @@ protected:
|
|||
virtual void run();
|
||||
|
||||
private:
|
||||
LIBCAMERA_DISABLE_COPY_AND_MOVE(Thread)
|
||||
|
||||
void startThread();
|
||||
void finishThread();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue