From patchwork Sun Mar 10 01:29:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 19649 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 77D3BBD1F1 for ; Sun, 10 Mar 2024 01:30:19 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 3691B62875; Sun, 10 Mar 2024 02:30:19 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=protonmail.com header.i=@protonmail.com header.b="Yp/lC0U2"; 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 6869D62871 for ; Sun, 10 Mar 2024 02:30:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1710034218; x=1710293418; bh=JHrwu+YgxB61Wqd6C1h48Hd/WQri8yRKt0yhoobnWVs=; 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; b=Yp/lC0U2ZQ5CrWK5WeKVtgVpY9ICQ3jaVQ/Kwf035E7LgKYO+mL9b5NONNm1CY+vE V6eD1D843e7Osm8ZvDlZt3C422Ywg/MvUbMLThDCJ0eQVLB3xG0KiVTDytX73jq6zn qAZHjI10jC7D39B9Mdlnp7SKI1l79iH99caoznBywqWR8OfNFEHECEmB4CTEhxl/9/ RgSBqcQu0n5cod6PLw7oqwIRRFP0d3lGUsmCUB1wTNKpda6wLb2XMt5YeOxfNiZF/1 rLDA8FxrMzE2fU7Re2ygTp96Wb4Z77dM8WfB5uWpMN6DCafCvtHbhheBdr9rx1mxSV 3SP2psIg0jnMg== Date: Sun, 10 Mar 2024 01:29:54 +0000 To: libcamera-devel@lists.libcamera.org From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= Subject: [PATCH v1 1/3] libcamera: framebuffer_allocator: move from argument in constructor Message-ID: <20240310012946.727641-2-pobrn@protonmail.com> In-Reply-To: <20240310012946.727641-1-pobrn@protonmail.com> References: <20240310012946.727641-1-pobrn@protonmail.com> Feedback-ID: 20568564:user:proton 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 single argument, of type `std::shared_ptr`, is passed by value, so it can simply be moved from in order to avoid calling the copy constructor. --- src/libcamera/framebuffer_allocator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcamera/framebuffer_allocator.cpp b/src/libcamera/framebuffer_allocator.cpp index 94389735..8cf45ab2 100644 --- a/src/libcamera/framebuffer_allocator.cpp +++ b/src/libcamera/framebuffer_allocator.cpp @@ -59,7 +59,7 @@ LOG_DEFINE_CATEGORY(Allocator) * \param[in] camera The camera */ FrameBufferAllocator::FrameBufferAllocator(std::shared_ptr camera) - : camera_(camera) + : camera_(std::move(camera)) { }