From patchwork Thu Oct 22 13:56:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 10200 X-Patchwork-Delegate: kieran.bingham@ideasonboard.com 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 BE87FC3D3C for ; Thu, 22 Oct 2020 13:56:13 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 9A29E6146E; Thu, 22 Oct 2020 15:56:11 +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="aoq3fpbg"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 9C329610B6 for ; Thu, 22 Oct 2020 15:56:10 +0200 (CEST) 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 1017453; Thu, 22 Oct 2020 15:56:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1603374970; bh=nDYTPfi/m7qecYLzCqIBaQXRGAFsD4RyGR2LgJiX1Hk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aoq3fpbg90skWnIj41NOeu5tF44x3aWEX5dz6fKRrNd5DpIidvUflnA+81P0exzTC qMPICaYFCw5lVbkCDolV3L/wfjrtLEKBpEUfgnbB8ox/LEibM1WIOJsMO45e+5Jvgo 2UcBp37/5yzonDGqa/y9yxeZvvrVnGZHLH7ZsJBE= From: Kieran Bingham To: libcamera devel Date: Thu, 22 Oct 2020 14:56:02 +0100 Message-Id: <20201022135605.614240-3-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201022135605.614240-1-kieran.bingham@ideasonboard.com> References: <20201022135605.614240-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/5] libcamera: buffer: Utilise DELETE_COPY_MOVE_AND_ASSIGN 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" Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- 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..42a20a387781 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: + DELETE_COPY_MOVE_AND_ASSIGN(FrameBuffer); + friend class Request; /* Needed to update request_. */ friend class V4L2VideoDevice; /* Needed to update metadata_. */