From patchwork Fri Feb 12 13:30:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 11263 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 CAEC0BD160 for ; Fri, 12 Feb 2021 13:31:05 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 0D97A63786; Fri, 12 Feb 2021 14:31:04 +0100 (CET) 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="XjFa0xk4"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 214B56377B for ; Fri, 12 Feb 2021 14:31:01 +0100 (CET) Received: from Q.local (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C0B611508; Fri, 12 Feb 2021 14:31:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1613136660; bh=hi76FhRNIqGfKZ1cz9+XkJLUF/rsE6a5k1IinjL/iCA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XjFa0xk4xX6vPtTA3loX4bBazlkJauoj77uOtmvI4TiZs1osiD59wDqZuUFIZFsod uMAPMzzHfH26M9XLNcqQkBOintb4dBYwAPgZBnV7lX9oQxRwaV9RNf55OVLI/ps3N3 l2C86VaHjsxKZYED2YjzR4/QG1/hFBDJGe3KadGo= From: Kieran Bingham To: libcamera devel Date: Fri, 12 Feb 2021 13:30:52 +0000 Message-Id: <20210212133056.873230-4-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210212133056.873230-1-kieran.bingham@ideasonboard.com> References: <20210212133056.873230-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 3/7] libcamera: buffer: Utilise LIBCAMERA_DISABLE_COPY_AND_MOVE 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" Convert the existing copy, move and assignment operators to use the new macros. Reviewed-by: Laurent Pinchart Signed-off-by: Kieran Bingham --- include/libcamera/buffer.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/include/libcamera/buffer.h b/include/libcamera/buffer.h index a26c8927d37a..302fe3d3e86b 100644 --- a/include/libcamera/buffer.h +++ b/include/libcamera/buffer.h @@ -10,6 +10,7 @@ #include #include +#include #include namespace libcamera { @@ -43,12 +44,6 @@ public: FrameBuffer(const std::vector &planes, unsigned int cookie = 0); - FrameBuffer(const FrameBuffer &) = delete; - FrameBuffer(FrameBuffer &&) = delete; - - FrameBuffer &operator=(const FrameBuffer &) = delete; - FrameBuffer &operator=(FrameBuffer &&) = delete; - const std::vector &planes() const { return planes_; } Request *request() const { return request_; } @@ -57,7 +52,10 @@ public: unsigned int cookie() const { return cookie_; } void setCookie(unsigned int cookie) { cookie_ = cookie; } + private: + LIBCAMERA_DISABLE_COPY_AND_MOVE(FrameBuffer) + friend class Request; /* Needed to update request_. */ friend class V4L2VideoDevice; /* Needed to update metadata_. */