summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-02-14 17:02:18 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-03-06 18:10:22 +0200
commiteaa1297df0bc4c6620ccde171dc9dc088109e35e (patch)
tree37a0d6d8495dd3b44468edc564a0c40a3b92cd86 /src
parent300f6e44345f5cb7bfe9aece6c6c5b5c0894487b (diff)
libcamera: controls: Move ControlValue get() and set() to controls.h
To avoid defining all specializations of ControlValue::get() and ControlValue::set() manually, move the definition of those functions to controls.h and turn them into single template functions. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/controls.cpp47
1 files changed, 0 insertions, 47 deletions
diff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp
index 6a0d66fb..f3d79785 100644
--- a/src/libcamera/controls.cpp
+++ b/src/libcamera/controls.cpp
@@ -175,53 +175,6 @@ bool ControlValue::operator==(const ControlValue &other) const
* \param[in] value The control value
*/
-#ifndef __DOXYGEN__
-template<>
-bool ControlValue::get<bool>() const
-{
- ASSERT(type_ == ControlTypeBool);
-
- return bool_;
-}
-
-template<>
-int32_t ControlValue::get<int32_t>() const
-{
- ASSERT(type_ == ControlTypeInteger32);
-
- return integer32_;
-}
-
-template<>
-int64_t ControlValue::get<int64_t>() const
-{
- ASSERT(type_ == ControlTypeInteger64);
-
- return integer64_;
-}
-
-template<>
-void ControlValue::set<bool>(const bool &value)
-{
- type_ = ControlTypeBool;
- bool_ = value;
-}
-
-template<>
-void ControlValue::set<int32_t>(const int32_t &value)
-{
- type_ = ControlTypeInteger32;
- integer32_ = value;
-}
-
-template<>
-void ControlValue::set<int64_t>(const int64_t &value)
-{
- type_ = ControlTypeInteger64;
- integer64_ = value;
-}
-#endif /* __DOXYGEN__ */
-
/**
* \class ControlId
* \brief Control static metadata