summaryrefslogtreecommitdiff
path: root/src/cam
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-07-06 08:12:13 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-07-22 17:13:21 +0300
commitc71691e66cb463dffe749b201724877449e67866 (patch)
treefe7da74d4bbd570503e20bf718e40d5172e93570 /src/cam
parenta8f3a68ec91bd84ea481ea7ac2fba02b3846d6ab (diff)
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 <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/cam')
-rw-r--r--src/cam/options.h6
1 files changed, 6 insertions, 0 deletions
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<Option> &options, unsigned int indent);
std::list<Option> options_;