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

Unified Diff: tests/DynamicHashTest.cpp

Issue 22318002: old compiler is dumb (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: ok cryptic warning, what do you mean Created 7 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/DynamicHashTest.cpp
diff --git a/tests/DynamicHashTest.cpp b/tests/DynamicHashTest.cpp
index e15aad584685d4619d261c84bf522d287b9aeb85..4a8c3a01a28d316016eb7091ed6e39c17e052712 100644
--- a/tests/DynamicHashTest.cpp
+++ b/tests/DynamicHashTest.cpp
@@ -5,14 +5,14 @@ namespace {
struct Entry {
int key;
- float value;
-
- static const int& Key(const Entry& entry) { return entry.key; }
- static uint32_t Hash(const int& key) { return key; }
- static bool Equal(const Entry& entry, const int& key) { return entry.key == key; }
+ double value;
};
+const int& GetKey(const Entry& entry) { return entry.key; }
+uint32_t GetHash(const int& key) { return key; }
+bool AreEqual(const Entry& entry, const int& key) { return entry.key == key; }
+
-class Hash : public SkTDynamicHash<Entry, int, Entry::Key, Entry::Hash, Entry::Equal> {
+class Hash : public SkTDynamicHash<Entry, int, GetKey, GetHash, AreEqual> {
public:
Hash() : INHERITED() {}
Hash(int capacity) : INHERITED(capacity) {}
@@ -22,7 +22,7 @@ public:
int countCollisions(const int& key) const { return this->INHERITED::countCollisions(key); }
private:
- typedef SkTDynamicHash<Entry, int, Entry::Key, Entry::Hash, Entry::Equal> INHERITED;
+ typedef SkTDynamicHash<Entry, int, GetKey, GetHash, AreEqual> INHERITED;
};
} // namespace
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698