From patchwork Mon Jul 12 21:56:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 12920 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 4071CC3226 for ; Mon, 12 Jul 2021 21:57:45 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B2D7968537; Mon, 12 Jul 2021 23:57:44 +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="YdVB1PtR"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 24CBC68513 for ; Mon, 12 Jul 2021 23:57:38 +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 CCC993F1 for ; Mon, 12 Jul 2021 23:57:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1626127058; bh=oYV6JVyDxp7EFxRmXWOnlY6026MGPvJj1KvTaYunqVM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=YdVB1PtRCEw5Z+gI2oXhg48q5oYOy6exw+ZBRKg4qkPI7kud2KGl2x9FCLQjrx9VP 4fZMZ9J+Z/YkPvmnvGBRip6J/DFjxq8mlwH5AswaDf34S/dxB1lfIfhDLDrrWe/jXL h08QbwYGzcalp0Wi9ARuktyfH/AN2GjuO7hEa5Cg= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Tue, 13 Jul 2021 00:56:22 +0300 Message-Id: <20210712215645.30478-8-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210712215645.30478-1-laurent.pinchart@ideasonboard.com> References: <20210712215645.30478-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 07/30] cam: options: Disable copy for parsers 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" Copying the OptionsParser class would result in the optionsMap_ entries pointing to Option entries of the original instance. As there's no use case for copying the class, disable copying. Disable copying of KeyValueParser as well for consistency as there's no use case either. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- src/cam/options.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/cam/options.h b/src/cam/options.h index 01a5d36a63fb..4418e201bf1f 100644 --- a/src/cam/options.h +++ b/src/cam/options.h @@ -68,6 +68,9 @@ public: virtual Options parse(const char *arguments); private: + KeyValueParser(const KeyValueParser &) = delete; + KeyValueParser &operator=(const KeyValueParser &) = delete; + friend class OptionsParser; void usage(int indent); @@ -95,6 +98,9 @@ public: void usage(); private: + OptionsParser(const OptionsParser &) = delete; + OptionsParser &operator=(const OptionsParser &) = delete; + void usageOptions(const std::list