summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cam/options.cpp20
-rw-r--r--src/cam/options.h2
-rw-r--r--src/cam/stream_options.cpp3
3 files changed, 1 insertions, 24 deletions
diff --git a/src/cam/options.cpp b/src/cam/options.cpp
index 59b26be4..fda6d976 100644
--- a/src/cam/options.cpp
+++ b/src/cam/options.cpp
@@ -604,26 +604,6 @@ OptionValue::operator std::string() const
}
/**
- * \brief Cast the value to a key-value list
- * \return The option value as a KeyValueParser::Options, or an empty list if
- * the value type isn't ValueType::ValueKeyValue
- */
-OptionValue::operator KeyValueParser::Options() const
-{
- return toKeyValues();
-}
-
-/**
- * \brief Cast the value to an array
- * \return The option value as a std::vector of OptionValue, or an empty vector
- * if the value type isn't ValueType::ValueArray
- */
-OptionValue::operator std::vector<OptionValue>() const
-{
- return toArray();
-}
-
-/**
* \brief Retrieve the value as 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 e894822c..210e502a 100644
--- a/src/cam/options.h
+++ b/src/cam/options.h
@@ -138,8 +138,6 @@ public:
operator int() const;
operator std::string() const;
- operator KeyValueParser::Options() const;
- operator std::vector<OptionValue>() const;
int toInteger() const;
std::string toString() const;
diff --git a/src/cam/stream_options.cpp b/src/cam/stream_options.cpp
index c58272c2..b90dbb97 100644
--- a/src/cam/stream_options.cpp
+++ b/src/cam/stream_options.cpp
@@ -48,11 +48,10 @@ StreamRoles StreamKeyValueParser::roles(const OptionValue &values)
StreamRoles roles;
for (auto const &value : streamParameters) {
- KeyValueParser::Options opts = value.toKeyValues();
StreamRole role;
/* If role is invalid or not set default to viewfinder. */
- if (!parseRole(&role, value))
+ if (!parseRole(&role, value.toKeyValues()))
role = StreamRole::Viewfinder;
roles.push_back(role);