[{"id":15104,"web_url":"https://patchwork.libcamera.org/comment/15104/","msgid":"<YCWc//n9VSP5X5Ad@pendragon.ideasonboard.com>","date":"2021-02-11T21:09:19","subject":"Re: [libcamera-devel] [PATCH v2 3/6] libcamera: buffer: Utilise\n\tDISABLE_COPY_AND_MOVE","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran,\n\nThank you for the patch.\n\nOn Thu, Feb 11, 2021 at 01:34:41PM +0000, Kieran Bingham wrote:\n> Convert the existing copy, move and assignment operators to use the new\n> macros.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  include/libcamera/buffer.h | 10 ++++------\n>  1 file changed, 4 insertions(+), 6 deletions(-)\n> \n> diff --git a/include/libcamera/buffer.h b/include/libcamera/buffer.h\n> index a26c8927d37a..d03af787cc08 100644\n> --- a/include/libcamera/buffer.h\n> +++ b/include/libcamera/buffer.h\n> @@ -10,6 +10,7 @@\n>  #include <stdint.h>\n>  #include <vector>\n>  \n> +#include <libcamera/class.h>\n>  #include <libcamera/file_descriptor.h>\n>  \n>  namespace libcamera {\n> @@ -43,12 +44,6 @@ public:\n>  \n>  \tFrameBuffer(const std::vector<Plane> &planes, unsigned int cookie = 0);\n>  \n> -\tFrameBuffer(const FrameBuffer &) = delete;\n> -\tFrameBuffer(FrameBuffer &&) = delete;\n> -\n> -\tFrameBuffer &operator=(const FrameBuffer &) = delete;\n> -\tFrameBuffer &operator=(FrameBuffer &&) = delete;\n> -\n>  \tconst std::vector<Plane> &planes() const { return planes_; }\n>  \n>  \tRequest *request() const { return request_; }\n> @@ -57,7 +52,10 @@ public:\n>  \n>  \tunsigned int cookie() const { return cookie_; }\n>  \tvoid setCookie(unsigned int cookie) { cookie_ = cookie; }\n> +\n>  private:\n> +\tLIBCAMERA_DISABLE_COPY_AND_MOVE(FrameBuffer);\n> +\n>  \tfriend class Request; /* Needed to update request_. */\n>  \tfriend class V4L2VideoDevice; /* Needed to update metadata_. */\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 3D2DFBD160\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 11 Feb 2021 21:09:46 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0AEBE6374A;\n\tThu, 11 Feb 2021 22:09:46 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1E12363746\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 11 Feb 2021 22:09:45 +0100 (CET)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id A4E7C41;\n\tThu, 11 Feb 2021 22:09:44 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"eiwoVNZ/\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1613077784;\n\tbh=LLYJTKJJj115Aft1NNiM1/KzhA+UQUTDN5TEpSSJK7U=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=eiwoVNZ/mJ8xxUoSLmlTfULY2AiGqb2AO7u0nlhQOZg66V1hgXnNHEOO+g65bwQXm\n\tCLwkMYLyWhSUjghMPFv8SjRLVIcaSzjVCrUzsC7mWxCNGF5tkbSLzGsovjzlpZZaUg\n\teUIMIAmiAFtm3DYjupTQs30ysMdXRzgMrfs6IVhk=","Date":"Thu, 11 Feb 2021 23:09:19 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<YCWc//n9VSP5X5Ad@pendragon.ideasonboard.com>","References":"<20210211133444.764808-1-kieran.bingham@ideasonboard.com>\n\t<20210211133444.764808-4-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210211133444.764808-4-kieran.bingham@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v2 3/6] libcamera: buffer: Utilise\n\tDISABLE_COPY_AND_MOVE","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]