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

Unified Diff: src/pdf/SkPDFCanon.h

Issue 1405053002: SkTHash: hash from fnptr to functor type (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 2 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 | « include/private/SkTHash.h ('k') | tests/ChecksumTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFCanon.h
diff --git a/src/pdf/SkPDFCanon.h b/src/pdf/SkPDFCanon.h
index 988b2855e11404b0242e924cf809c05815d8af60..3d2ba6a77d1b4b2ea36023814c11080553e33e65 100644
--- a/src/pdf/SkPDFCanon.h
+++ b/src/pdf/SkPDFCanon.h
@@ -102,10 +102,12 @@ private:
SkASSERT(rhs.fPtr);
return *fPtr == *rhs.fPtr;
}
- static uint32_t Hash(const WrapGS& w) {
- SkASSERT(w.fPtr);
- return w.fPtr->hash();
- }
+ struct Hash {
+ uint32_t operator()(const WrapGS& w) const {
+ SkASSERT(w.fPtr);
+ return w.fPtr->hash();
+ }
+ };
};
SkTHashSet<WrapGS, WrapGS::Hash> fGraphicStateRecords;
« no previous file with comments | « include/private/SkTHash.h ('k') | tests/ChecksumTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698