[libcamera-devel] [PATCH v2 1/5] cam: options: Make KeyValueParser::parse() virtual

Niklas Söderlund niklas.soderlund at ragnatech.se
Tue Apr 28 00:05:25 CEST 2020


Prepare for sub-classing of the KeyValueParser by making the parse()
method virtual.

Signed-off-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
---
 src/cam/options.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/cam/options.h b/src/cam/options.h
index 5e346b474f765841..5060fee0c26b896f 100644
--- a/src/cam/options.h
+++ b/src/cam/options.h
@@ -71,10 +71,12 @@ public:
 	{
 	};
 
+	virtual ~KeyValueParser(){};
+
 	bool addOption(const char *name, OptionType type, const char *help,
 		       OptionArgument argument = ArgumentNone);
 
-	Options parse(const char *arguments);
+	virtual Options parse(const char *arguments);
 	void usage(int indent);
 
 private:
-- 
2.26.0



More information about the libcamera-devel mailing list