From patchwork Thu Jan 30 11:50:13 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: 22661 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 92F4DBDB1C for ; Thu, 30 Jan 2025 11:50:21 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 490496856A; Thu, 30 Jan 2025 12:50:21 +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="KWtOvRPx"; dkim-atps=neutral Received: from mail-40131.protonmail.ch (mail-40131.protonmail.ch [185.70.40.131]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 45F076851B for ; Thu, 30 Jan 2025 12:50:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1738237818; x=1738497018; bh=QWjz6/M4YbBh8sUNp10+V/Pp31LxoiqvTTEfCQGMAR4=; 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=KWtOvRPx14paoEq62XHhAyzlZ2jmodxMjwqPTlvfCmSQjlKJiDE1Le2Q9JxO1xmYi DCvYFNbZ4kREdJ/7AlMizoG814go/0Fnf57zVTZCoejgSbqCJ0jm3m7ciGMZhdMPTj ULZEzUomVcE4VGBrbBqoW/wUDZsGofKbdbzpC5PH5ceVLwA+7kOBDVpuxZ0r4c+ENa bCtEu5i5MG8oucx2lN0CxvOt24H6aKcwrcMKrKzz3VdgzwvOnYpt2aZOMZlNTSO+31 Aq9vNaxwrqtPxc6pHnYawOK9ZX5sneLospFysc/7lWuplw8P5TuKxCQmRbUtUhPbM8 +cXgrHQy0Q90g== Date: Thu, 30 Jan 2025 11:50:13 +0000 To: libcamera-devel@lists.libcamera.org From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= Subject: [RFC PATCH v3 02/21] apps: common: event_loop: Disable copy/move Message-ID: <20250130115001.1129305-3-pobrn@protonmail.com> In-Reply-To: <20250130115001.1129305-1-pobrn@protonmail.com> References: <20250130115001.1129305-1-pobrn@protonmail.com> Feedback-ID: 20568564:user:proton X-Pm-Message-ID: 1cff335e5849fb761b04346b83305d872fc30d22 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 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 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);