From cdf7fbe35e60e9341809446a66a3e0637a74d743 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= Date: Mon, 27 Apr 2020 15:00:07 +0200 Subject: cam: options: Add public method to invalidate options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Extend OptionsBase with a public invalidate() method. This allows for further examination of the options and if found unsuitable be invalidated. The intended user for this new interface are subclasses of KeyValueParser. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart --- src/cam/options.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/cam/options.cpp') diff --git a/src/cam/options.cpp b/src/cam/options.cpp index 2c56eacf..77b3cc1f 100644 --- a/src/cam/options.cpp +++ b/src/cam/options.cpp @@ -64,6 +64,12 @@ const OptionValue &OptionsBase::operator[](const T &opt) const return values_.find(opt)->second; } +template +void OptionsBase::invalidate() +{ + valid_ = false; +} + template bool OptionsBase::parseValue(const T &opt, const Option &option, const char *optarg) -- cgit v1.2.1