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

Unified Diff: tests/HashTest.cpp

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 | « tests/ChecksumTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/HashTest.cpp
diff --git a/tests/HashTest.cpp b/tests/HashTest.cpp
index c90c377cc25b4adb334bef0106b16b84ac5954cb..c9b1bc967bd852bbf848e8c2f166d8e05da70187 100644
--- a/tests/HashTest.cpp
+++ b/tests/HashTest.cpp
@@ -120,14 +120,16 @@ private:
uint32_t* fCounter;
};
-uint32_t hash_copy_counter(const CopyCounter&) {
- return 0; // let them collide, what do we care?
-}
+struct HashCopyCounter {
+ uint32_t operator()(const CopyCounter&) const {
+ return 0; // let them collide, what do we care?
+ }
+};
}
DEF_TEST(HashSetCopyCounter, r) {
- SkTHashSet<CopyCounter, hash_copy_counter> set;
+ SkTHashSet<CopyCounter, HashCopyCounter> set;
uint32_t globalCounter = 0;
CopyCounter copyCounter1(1, &globalCounter);
« no previous file with comments | « tests/ChecksumTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698