Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Unified Diff: include/private/SkTHash.h

Issue 1372783003: SkPDF: Implement drawImage*() properly (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gyp/pdf.gyp ('k') | src/pdf/SkJpegInfo.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « gyp/pdf.gyp ('k') | src/pdf/SkJpegInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698