From patchwork Fri Aug 15 12:31:37 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: 24140 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 25EEBBDCC1 for ; Fri, 15 Aug 2025 12:31:48 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 255DF69259; Fri, 15 Aug 2025 14:31:46 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="QsalsLYz"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1048F6924E for ; Fri, 15 Aug 2025 14:31:43 +0200 (CEST) Received: from pb-laptop.local (185.221.141.188.nat.pool.zt.hu [185.221.141.188]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 0C6FB63B; Fri, 15 Aug 2025 14:30:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1755261048; bh=184HUgCoMcq401l6660AonJKHgbcZ6p+pB4xZviEhgA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=QsalsLYzBmGF5leE7bjRd1wiZiyyVtNMHs5UQh5TP1KnaqsnTWGfMRH5RAXBXbJWc yKvnS7CrfeuwTrd5rA66GUpz2jr/eZbGualjhPK4sU0IBoP70kFGYUxVVI8VDU/e+1 JbbenweIKz9J9/IfYCRWjFdBDi4OrGojsNVZs13c= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org, Paul Elder , Laurent Pinchart Subject: [RFC PATCH v2 2/3] utils: codegen: ipc: Default special member ops Date: Fri, 15 Aug 2025 14:31:37 +0200 Message-ID: <20250815123138.2213654-2-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250815123138.2213654-1-barnabas.pocze@ideasonboard.com> References: <20250815123138.2213654-1-barnabas.pocze@ideasonboard.com> 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" Default the copy/move constructor/assignment operators so that they are available if possible. This can allow more efficient passing and construction of these objects. Signed-off-by: Barnabás Pőcze Reviewed-by: Paul Elder --- changes in v2: none --- .../libcamera_templates/definition_functions.tmpl | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.50.1 diff --git a/utils/codegen/ipc/generators/libcamera_templates/definition_functions.tmpl b/utils/codegen/ipc/generators/libcamera_templates/definition_functions.tmpl index 16d11c309..3a57a3c2c 100644 --- a/utils/codegen/ipc/generators/libcamera_templates/definition_functions.tmpl +++ b/utils/codegen/ipc/generators/libcamera_templates/definition_functions.tmpl @@ -39,6 +39,12 @@ public: {%- endfor %} { } + + {{struct.mojom_name}}(const {{struct.mojom_name}} &) = default; + {{struct.mojom_name}} &operator=(const {{struct.mojom_name}} &) = default; + {{struct.mojom_name}}({{struct.mojom_name}} &&) = default; + {{struct.mojom_name}} &operator=({{struct.mojom_name}} &&) = default; + ~{{struct.mojom_name}}() = default; #endif {% for field in struct.fields %}