From patchwork Thu Sep 23 11:55:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 13910 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 5FFE7BF01C for ; Thu, 23 Sep 2021 11:56:05 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 22A436918C; Thu, 23 Sep 2021 13:56:05 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="vHw28Keu"; 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 0CDD869189 for ; Thu, 23 Sep 2021 13:56:04 +0200 (CEST) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id A183F58B for ; Thu, 23 Sep 2021 13:56:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1632398163; bh=GP4xKjNS/jjGmogU1d2OQT9FAfcp+ypnZMWrIoe7SpE=; h=From:To:Subject:Date:From; b=vHw28KeuQHZut7HKi3P9lKrYz6lGaqNDmYXjWeTUlz+UzA0QfKOSUEaKJK33T7PgY 0zbtwQ7w77Q95kabg2dDBDYL2dmMcmkAblKarqI8FSQZglzhW0WopEcVIlf5Li431B mrkjC78d2eGV6MBz1H8HfLUi8s1dxwZFlBZPCpwk= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Thu, 23 Sep 2021 14:55:58 +0300 Message-Id: <20210923115558.31107-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] libcamera: v4l2_videodevice: Don't move planes to construct FrameBuffer 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 FrameBuffer class has no constructor that takes an rvalue reference to planes. The std::move() is thus misleading as a copy will still take place. Drop it to clarify the code, no functional change is introduced. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Reviewed-by: Umang Jain Reviewed-by: Paul Elder --- src/libcamera/v4l2_videodevice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) base-commit: 2cc4303b172a76ac5b431c4fb4df8a083f7d3fcf diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp index 9b3ee88757be..ba5f88cd41ed 100644 --- a/src/libcamera/v4l2_videodevice.cpp +++ b/src/libcamera/v4l2_videodevice.cpp @@ -1376,7 +1376,7 @@ std::unique_ptr V4L2VideoDevice::createBuffer(unsigned int index) } } - return std::make_unique(std::move(planes)); + return std::make_unique(planes); } FileDescriptor V4L2VideoDevice::exportDmabufFd(unsigned int index,