From c71691e66cb463dffe749b201724877449e67866 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Tue, 6 Jul 2021 08:12:13 +0300 Subject: cam: options: Disable copy for parsers 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(+) (limited to 'src') diff --git a/src/cam/options.h b/src/cam/options.h index 01a5d36a..4418e201 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