Commit e1e018d2 authored by Xianzhu Wang's avatar Xianzhu Wang Committed by Commit Bot

Fix LayerTreeImpl::IteratorAdapter for clang-10

This makes std::iterator_traits work for IteratorAdapter, which may
be required by some std algorithms.

Change-Id: Ib7bf7d8c7f97e6287006314e3b8958ed53bd6b1e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1825467Reviewed-by: default avatarPhilip Rogers <pdr@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#699897}
parent 8a33e69d
...@@ -194,7 +194,8 @@ class CC_EXPORT LayerTreeImpl { ...@@ -194,7 +194,8 @@ class CC_EXPORT LayerTreeImpl {
// Adapts an iterator of std::unique_ptr<LayerImpl> to an iterator of // Adapts an iterator of std::unique_ptr<LayerImpl> to an iterator of
// LayerImpl*. // LayerImpl*.
template <typename Iterator> template <typename Iterator>
class IteratorAdapter { class IteratorAdapter
: public std::iterator<std::forward_iterator_tag, LayerImpl*> {
public: public:
explicit IteratorAdapter(Iterator it) : it_(it) {} explicit IteratorAdapter(Iterator it) : it_(it) {}
bool operator==(IteratorAdapter o) const { return it_ == o.it_; } bool operator==(IteratorAdapter o) const { return it_ == o.it_; }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment