From patchwork Wed Aug 6 15:48:41 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: 24065 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 4A6CABDCC1 for ; Wed, 6 Aug 2025 15:48:50 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 01FD46921E; Wed, 6 Aug 2025 17:48:50 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="LklMv5KE"; 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 88AC66921A for ; Wed, 6 Aug 2025 17:48:46 +0200 (CEST) Received: from pb-laptop.local (185.182.215.213.nat.pool.zt.hu [185.182.215.213]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id EFFBF1026; Wed, 6 Aug 2025 17:47:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1754495278; bh=UYdTJ5UPoeIp2IuBOhgfsAiXAdAJXg1zWNqN1bDLrVw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=LklMv5KEBFTpQr2V2mGLTENdNORa3C8qGXxtUGsOVnefr78xBd5UQVcW1v4kXN1/1 Seow3uUTNyDQVPByDArxBmGGbpD6L/H1uV2fyx9Uycy17J2lPGLLToSns7JBZbtWh3 SIf+4ILMJdJafZio2q1V1hGAA9/KFWpJWi+/ZUM4= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org, Paul Elder Subject: [RFC PATCH v1 2/3] utils: codegen: ipc: Default special member ops Date: Wed, 6 Aug 2025 17:48:41 +0200 Message-ID: <20250806154842.597155-2-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250806154842.597155-1-barnabas.pocze@ideasonboard.com> References: <20250806154842.597155-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 --- .../libcamera_templates/definition_functions.tmpl | 6 ++++++ 1 file changed, 6 insertions(+) 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 %}