mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-23 16:45:07 +03:00
libcamera: base: utils: Use size_t for index in utils::enumerate()
The index generated by utils::enumerate() is an iteration counter, which should thus be positive. Use std::size_t instead of the difference_type of the container. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
This commit is contained in:
parent
06e53199c2
commit
f9c1a40e21
2 changed files with 7 additions and 7 deletions
|
@ -246,7 +246,7 @@ private:
|
|||
|
||||
public:
|
||||
using difference_type = typename std::iterator_traits<Base>::difference_type;
|
||||
using value_type = std::pair<const difference_type, base_reference>;
|
||||
using value_type = std::pair<const std::size_t, base_reference>;
|
||||
using pointer = value_type *;
|
||||
using reference = value_type &;
|
||||
using iterator_category = std::input_iterator_tag;
|
||||
|
@ -275,7 +275,7 @@ public:
|
|||
|
||||
private:
|
||||
Base current_;
|
||||
difference_type pos_;
|
||||
std::size_t pos_;
|
||||
};
|
||||
|
||||
template<typename Base>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue