summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cam/options.cpp7
-rw-r--r--src/cam/options.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/src/cam/options.cpp b/src/cam/options.cpp
index fda6d976..481ac189 100644
--- a/src/cam/options.cpp
+++ b/src/cam/options.cpp
@@ -584,6 +584,13 @@ void OptionValue::addValue(const OptionValue &value)
*/
/**
+ * \fn OptionValue::empty()
+ * \brief Check if the value is empty
+ * \return True if the value is empty (type set to ValueType::ValueNone), or
+ * false otherwise
+ */
+
+/**
* \brief Cast the value to an int
* \return The option value as an int, or 0 if the value type isn't
* ValueType::ValueInteger
diff --git a/src/cam/options.h b/src/cam/options.h
index 210e502a..83c409ae 100644
--- a/src/cam/options.h
+++ b/src/cam/options.h
@@ -135,6 +135,7 @@ public:
void addValue(const OptionValue &value);
ValueType type() const { return type_; }
+ bool empty() const { return type_ == ValueType::ValueNone; }
operator int() const;
operator std::string() const;