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>
This commit is contained in:
@@ -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_;
|
||||
|
||||
Reference in New Issue
Block a user