diff options
Diffstat (limited to 'src/libcamera/v4l2_controls.cpp')
-rw-r--r-- | src/libcamera/v4l2_controls.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/libcamera/v4l2_controls.cpp b/src/libcamera/v4l2_controls.cpp index 3f5f3ff1..3be21997 100644 --- a/src/libcamera/v4l2_controls.cpp +++ b/src/libcamera/v4l2_controls.cpp @@ -156,11 +156,29 @@ V4L2ControlInfo::V4L2ControlInfo(const struct v4l2_query_ext_ctrl &ctrl) */ /** - * \typedef V4L2ControlInfoMap + * \class V4L2ControlInfoMap * \brief A map of control ID to V4L2ControlInfo */ /** + * \brief Move assignment operator from plain map + * \param[in] info The control info map + * + * Populate the map by replacing its contents with those of \a info using move + * semantics. Upon return the \a info map will be empty. + * + * This is the only supported way to populate a V4L2ControlInfoMap. + * + * \return The populated V4L2ControlInfoMap + */ +V4L2ControlInfoMap &V4L2ControlInfoMap::operator=(std::map<unsigned int, V4L2ControlInfo> &&info) +{ + std::map<unsigned int, V4L2ControlInfo>::operator=(std::move(info)); + + return *this; +} + +/** * \class V4L2Control * \brief A V4L2 control value * |