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

Unified Diff: src/hashmap.h

Issue 239133002: Refactoring: HashMap: provide a pointer match function, so users don't need to. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased Created 6 years, 8 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 | « src/debug.h ('k') | src/heap-snapshot-generator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hashmap.h
diff --git a/src/hashmap.h b/src/hashmap.h
index 11f6ace7d8384ce0c754452125c2524715a6e301..65ca7a5f2c00dfe08e48e32a053d0472af78071a 100644
--- a/src/hashmap.h
+++ b/src/hashmap.h
@@ -98,6 +98,11 @@ class TemplateHashMapImpl {
Entry* Start() const;
Entry* Next(Entry* p) const;
+ // Some match functions defined for convenience.
+ static bool PointersMatch(void* key1, void* key2) {
+ return key1 == key2;
+ }
+
private:
MatchFun match_;
Entry* map_;
« no previous file with comments | « src/debug.h ('k') | src/heap-snapshot-generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698