From a0f4092c6c7103db2d0a14adda49959378d48c1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Mon, 13 Jan 2025 14:54:19 +0100 Subject: apps: common: event_loop: Disable copy/move MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Jacopo Mondi --- src/apps/common/event_loop.h | 5 +++++ 1 file changed, 5 insertions(+) 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 #include +#include + #include struct event_base; @@ -43,8 +45,11 @@ public: std::function &&handler); private: + LIBCAMERA_DISABLE_COPY_AND_MOVE(EventLoop) + struct Event { Event(std::function &&callback); + LIBCAMERA_DISABLE_COPY_AND_MOVE(Event) ~Event(); static void dispatch(int fd, short events, void *arg); -- cgit v1.2.1