OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef GrOrderedSet_DEFINED | 8 #ifndef GrOrderedSet_DEFINED |
9 #define GrOrderedSet_DEFINED | 9 #define GrOrderedSet_DEFINED |
10 | 10 |
11 #include "GrRedBlackTree.h" | 11 #include "GrRedBlackTree.h" |
12 | 12 |
13 template <typename T, typename C = GrLess<T> > | 13 template <typename T, typename C = GrLess<T> > |
14 class GrOrderedSet : public SkNoncopyable { | 14 class GrOrderedSet : SkNoncopyable { |
15 public: | 15 public: |
16 /** | 16 /** |
17 * Creates an empty set | 17 * Creates an empty set |
18 */ | 18 */ |
19 GrOrderedSet() : fComp() {} | 19 GrOrderedSet() : fComp() {} |
20 ~GrOrderedSet() {} | 20 ~GrOrderedSet() {} |
21 | 21 |
22 class Iter; | 22 class Iter; |
23 | 23 |
24 /** | 24 /** |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 } | 145 } |
146 | 146 |
147 template <typename T, typename C> | 147 template <typename T, typename C> |
148 void GrOrderedSet<T,C>::remove(const typename GrOrderedSet<T,C>::Iter& iter) { | 148 void GrOrderedSet<T,C>::remove(const typename GrOrderedSet<T,C>::Iter& iter) { |
149 if (this->end() != iter) { | 149 if (this->end() != iter) { |
150 fRBTree.remove(iter.getTreeIter()); | 150 fRBTree.remove(iter.getTreeIter()); |
151 } | 151 } |
152 } | 152 } |
153 | 153 |
154 #endif | 154 #endif |
OLD | NEW |