{"id":11265,"url":"https://patchwork.libcamera.org/api/1.1/patches/11265/?format=json","web_url":"https://patchwork.libcamera.org/patch/11265/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20210212133056.873230-6-kieran.bingham@ideasonboard.com>","date":"2021-02-12T13:30:54","name":"[libcamera-devel,v3,5/7] libcamera: controls: Utilise LIBCAMERA_DISABLE_COPY_AND_MOVE","commit_ref":"83c5a2a7aa67b609bc5c14698b76b9eaee644d17","pull_url":null,"state":"accepted","archived":false,"hash":"f3e284fcc4781e7191791f76e46066eb088ea24e","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/1.1/people/4/?format=json","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/11265/mbox/","series":[{"id":1685,"url":"https://patchwork.libcamera.org/api/1.1/series/1685/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1685","date":"2021-02-12T13:30:49","name":"Delete Copy-Move-Assign","version":3,"mbox":"https://patchwork.libcamera.org/series/1685/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/11265/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/11265/checks/","tags":{},"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 A6DACBD160\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 12 Feb 2021 13:31:06 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 748146379C;\n\tFri, 12 Feb 2021 14:31:06 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A0B376377B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 12 Feb 2021 14:31:01 +0100 (CET)","from Q.local (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net\n\t[86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 478391810;\n\tFri, 12 Feb 2021 14:31:01 +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=\"HK4pMxDT\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1613136661;\n\tbh=1hKv8iCmzZsacu0636JZJAtvUt4JbL1REGbPeULZg2o=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=HK4pMxDTELhdST5RZkMOtEQH3k/UVryVyxepckDrJiq0nkdnyWDkybCGoFx7vBVLP\n\tHicODMt6LdZBFJmbccxMcQRhSQZ8PKUvHzZxEh3gcNlxhZvbCZ6cTj+BvjY7UJI3IT\n\tamaE9vKU97qbF8PPXKMcNSgzLPRFwJLrZ/8CZzGo=","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"libcamera devel <libcamera-devel@lists.libcamera.org>","Date":"Fri, 12 Feb 2021 13:30:54 +0000","Message-Id":"<20210212133056.873230-6-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 5/7] libcamera: controls: Utilise\n\tLIBCAMERA_DISABLE_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>","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>"},"content":"The ControlId and Control classes disable the copy constructor and\nassignment operator, but they should also prevent move construction and\nassignment.\n\nUtilise LIBCAMERA_DISABLE_COPY_AND_MOVE to fully disable these\nfunctions.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n include/libcamera/controls.h | 7 +++----\n 1 file changed, 3 insertions(+), 4 deletions(-)","diff":"diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h\nindex 3b7f3347761e..1a5690a5ccbe 100644\n--- a/include/libcamera/controls.h\n+++ b/include/libcamera/controls.h\n@@ -14,6 +14,7 @@\n #include <unordered_map>\n #include <vector>\n \n+#include <libcamera/class.h>\n #include <libcamera/geometry.h>\n #include <libcamera/span.h>\n \n@@ -220,8 +221,7 @@ public:\n \tControlType type() const { return type_; }\n \n private:\n-\tControlId &operator=(const ControlId &) = delete;\n-\tControlId(const ControlId &) = delete;\n+\tLIBCAMERA_DISABLE_COPY_AND_MOVE(ControlId)\n \n \tunsigned int id_;\n \tstd::string name_;\n@@ -260,8 +260,7 @@ public:\n \t}\n \n private:\n-\tControl(const Control &) = delete;\n-\tControl &operator=(const Control &) = delete;\n+\tLIBCAMERA_DISABLE_COPY_AND_MOVE(Control)\n };\n \n class ControlInfo\n","prefixes":["libcamera-devel","v3","5/7"]}