diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-10-14 01:20:06 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-10-15 22:33:32 +0300 |
commit | c957c8580a30d5940f0d4893497f38e05c7f8e92 (patch) | |
tree | 8375d1d4e0bd543fe71f0bac67a83de86ae413c2 /src/libcamera/v4l2_controls.cpp | |
parent | 1bfed95c1e9a2f97fb850809dcdc42e9515defc7 (diff) |
libcamera: v4l2_controls: Derive V4L2ControlInfoMap from ControlInfoMap
Replace the std::map<> used as the base type for V4L2ControlInfoMap by
ControlInfoMap, which is an alias for an std::unsorted_map<> with the
same key and value types. This shortens the code.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/libcamera/v4l2_controls.cpp')
-rw-r--r-- | src/libcamera/v4l2_controls.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libcamera/v4l2_controls.cpp b/src/libcamera/v4l2_controls.cpp index 63416b9e..33816571 100644 --- a/src/libcamera/v4l2_controls.cpp +++ b/src/libcamera/v4l2_controls.cpp @@ -132,7 +132,7 @@ V4L2ControlRange::V4L2ControlRange(const struct v4l2_query_ext_ctrl &ctrl) */ /** - * \brief Move assignment operator from plain map + * \brief Move assignment operator from a ControlInfoMap * \param[in] info The control info map * * Populate the map by replacing its contents with those of \a info using move @@ -142,9 +142,9 @@ V4L2ControlRange::V4L2ControlRange(const struct v4l2_query_ext_ctrl &ctrl) * * \return The populated V4L2ControlInfoMap */ -V4L2ControlInfoMap &V4L2ControlInfoMap::operator=(std::map<const ControlId *, ControlRange> &&info) +V4L2ControlInfoMap &V4L2ControlInfoMap::operator=(ControlInfoMap &&info) { - std::map<const ControlId *, ControlRange>::operator=(std::move(info)); + ControlInfoMap::operator=(std::move(info)); idmap_.clear(); for (const auto &ctrl : *this) |