From patchwork Tue Jan 14 18:21:56 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 22563 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 317EDC3301 for ; Tue, 14 Jan 2025 18:22:02 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id DF992607D6; Tue, 14 Jan 2025 19:22:01 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=protonmail.com header.i=@protonmail.com header.b="wcvcfo2e"; dkim-atps=neutral Received: from mail-4322.protonmail.ch (mail-4322.protonmail.ch [185.70.43.22]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 727C2607D6 for ; Tue, 14 Jan 2025 19:22:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1736878920; x=1737138120; bh=Wp0RmpD70etEE/ATtJn2G0hd/QRpYx4CwO+U0XCuJ6k=; h=Date:To:From:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=wcvcfo2eu8JSAuxCoZkalj+Gkk538dRzk5XvYjaDSzT9LiU9wonw4OAvplp7d+Wm4 dDd+DGgS/60o5fTMNa0Z4gx1f5GlWCHC93rzVWCIxxOFasBxi72gNUK9PTqhMIggbl QW9iHzzRU5tDTneqsh4zzdekNwITuxenK+ksXLwhEA3hD0feJg1ksppynxqzujZzSz TJexHeg41IYfiYjpIgG7CWBPylOvWWqT4l32F9KoUwgHdcKpXMqXzYOFdg0DqaCMcJ oSUMyLNTuRYOJUzMKsQ6MP3gAZ/sMoFg79LEbnADypDbSwVuc4VE7SL5zJ5ImvrXN0 xoG7Imo1FXzjQ== Date: Tue, 14 Jan 2025 18:21:56 +0000 To: libcamera-devel@lists.libcamera.org From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= Subject: [RFC PATCH v2 02/16] apps: common: event_loop: Disable copy/move Message-ID: <20250114182143.1773762-3-pobrn@protonmail.com> In-Reply-To: <20250114182143.1773762-1-pobrn@protonmail.com> References: <20250114182143.1773762-1-pobrn@protonmail.com> Feedback-ID: 20568564:user:proton X-Pm-Message-ID: 3cfc531000f31e2f60431b00f7d9423fd4939cad MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" 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 --- 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 d7d012c76..4e8dd0a46 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);