diff options
author | Barnabás Pőcze <pobrn@protonmail.com> | 2025-01-13 14:54:19 +0100 |
---|---|---|
committer | Barnabás Pőcze <pobrn@protonmail.com> | 2025-02-27 17:29:28 +0100 |
commit | a0f4092c6c7103db2d0a14adda49959378d48c1b (patch) | |
tree | c02a0af9b495af7feb32303eda98a0ab312558b6 | |
parent | b1b99f4d662814e4ec8342b1836611760b8c9af6 (diff) |
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>
-rw-r--r-- | src/apps/common/event_loop.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/apps/common/event_loop.h b/src/apps/common/event_loop.h index d7d012c7..4e8dd0a4 100644 --- a/src/apps/common/event_loop.h +++ b/src/apps/common/event_loop.h @@ -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); |