apps: common: event_loop: Disable copy/move

The compiler generated functions are not appropriate, so
delete the copy/move constructor/assignment to avoid
potential issues.

Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
This commit is contained in:
Barnabás Pőcze 2025-01-13 14:54:19 +01:00
parent b1b99f4d66
commit a0f4092c6c

View file

@ -13,6 +13,8 @@
#include <memory>
#include <mutex>
#include <libcamera/base/class.h>
#include <event2/util.h>
struct event_base;
@ -43,8 +45,11 @@ public:
std::function<void()> &&handler);
private:
LIBCAMERA_DISABLE_COPY_AND_MOVE(EventLoop)
struct Event {
Event(std::function<void()> &&callback);
LIBCAMERA_DISABLE_COPY_AND_MOVE(Event)
~Event();
static void dispatch(int fd, short events, void *arg);