summaryrefslogtreecommitdiff
path: root/src/libcamera/include
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-10-14 01:20:06 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-10-15 22:33:32 +0300
commitc957c8580a30d5940f0d4893497f38e05c7f8e92 (patch)
tree8375d1d4e0bd543fe71f0bac67a83de86ae413c2 /src/libcamera/include
parent1bfed95c1e9a2f97fb850809dcdc42e9515defc7 (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/include')
-rw-r--r--src/libcamera/include/v4l2_controls.h38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/libcamera/include/v4l2_controls.h b/src/libcamera/include/v4l2_controls.h
index 7d3528b0..c427b845 100644
--- a/src/libcamera/include/v4l2_controls.h
+++ b/src/libcamera/include/v4l2_controls.h
@@ -31,27 +31,27 @@ public:
V4L2ControlRange(const struct v4l2_query_ext_ctrl &ctrl);
};
-class V4L2ControlInfoMap : private std::map<const ControlId *, ControlRange>
+class V4L2ControlInfoMap : private ControlInfoMap
{
public:
- V4L2ControlInfoMap &operator=(std::map<const ControlId *, ControlRange> &&info);
-
- using std::map<const ControlId *, ControlRange>::key_type;
- using std::map<const ControlId *, ControlRange>::mapped_type;
- using std::map<const ControlId *, ControlRange>::value_type;
- using std::map<const ControlId *, ControlRange>::size_type;
- using std::map<const ControlId *, ControlRange>::iterator;
- using std::map<const ControlId *, ControlRange>::const_iterator;
-
- using std::map<const ControlId *, ControlRange>::begin;
- using std::map<const ControlId *, ControlRange>::cbegin;
- using std::map<const ControlId *, ControlRange>::end;
- using std::map<const ControlId *, ControlRange>::cend;
- using std::map<const ControlId *, ControlRange>::at;
- using std::map<const ControlId *, ControlRange>::empty;
- using std::map<const ControlId *, ControlRange>::size;
- using std::map<const ControlId *, ControlRange>::count;
- using std::map<const ControlId *, ControlRange>::find;
+ V4L2ControlInfoMap &operator=(ControlInfoMap &&info);
+
+ using ControlInfoMap::key_type;
+ using ControlInfoMap::mapped_type;
+ using ControlInfoMap::value_type;
+ using ControlInfoMap::size_type;
+ using ControlInfoMap::iterator;
+ using ControlInfoMap::const_iterator;
+
+ using ControlInfoMap::begin;
+ using ControlInfoMap::cbegin;
+ using ControlInfoMap::end;
+ using ControlInfoMap::cend;
+ using ControlInfoMap::at;
+ using ControlInfoMap::empty;
+ using ControlInfoMap::size;
+ using ControlInfoMap::count;
+ using ControlInfoMap::find;
mapped_type &at(unsigned int key);
const mapped_type &at(unsigned int key) const;