diff options
-rw-r--r-- | include/libcamera/controls.h | 5 | ||||
-rw-r--r-- | src/libcamera/controls.cpp | 26 |
2 files changed, 4 insertions, 27 deletions
diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h index dfe69916..6f0ebf4f 100644 --- a/include/libcamera/controls.h +++ b/include/libcamera/controls.h @@ -146,7 +146,10 @@ class Control : public ControlId public: using type = T; - Control(unsigned int id, const char *name); + Control(unsigned int id, const char *name) + : ControlId(id, name, details::control_type<std::remove_cv_t<T>>::value) + { + } private: Control(const Control &) = delete; diff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp index 5cc8ce21..76230a05 100644 --- a/src/libcamera/controls.cpp +++ b/src/libcamera/controls.cpp @@ -249,32 +249,6 @@ bool ControlValue::operator==(const ControlValue &other) const * \brief The Control template type T */ -#ifndef __DOXYGEN__ -template<> -Control<void>::Control(unsigned int id, const char *name) - : ControlId(id, name, ControlTypeNone) -{ -} - -template<> -Control<bool>::Control(unsigned int id, const char *name) - : ControlId(id, name, ControlTypeBool) -{ -} - -template<> -Control<int32_t>::Control(unsigned int id, const char *name) - : ControlId(id, name, ControlTypeInteger32) -{ -} - -template<> -Control<int64_t>::Control(unsigned int id, const char *name) - : ControlId(id, name, ControlTypeInteger64) -{ -} -#endif /* __DOXYGEN__ */ - /** * \class ControlRange * \brief Describe the limits of valid values for a Control |