Chromium Code Reviews| Index: include/private/SkTHash.h |
| diff --git a/include/private/SkTHash.h b/include/private/SkTHash.h |
| index 53d52754bd36340db546c92b0d8309f90cdee5f2..db6709a5086863ffbb1b081384e7184afda625b5 100644 |
| --- a/include/private/SkTHash.h |
| +++ b/include/private/SkTHash.h |
| @@ -242,6 +242,12 @@ public: |
| fTable.foreach([&fn](const Pair& p){ fn(p.key, p.val); }); |
| } |
| + // Call fn on every value in the table. You may not mutate anything. |
| + template <typename Fn> // f(const V&) or f(V) |
| + void foreachValue(Fn&& fn) const { |
|
mtklein
2015/09/27 07:20:32
What value does this add? Can you not just ignore
|
| + fTable.foreach([&fn](const Pair& p) { fn(p.val); }); |
| + } |
| + |
| private: |
| struct Pair { |
| K key; |