aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/DynamicHashTest.cpp
diff options
context:
space:
mode:
authorGravatar mtklein@google.com <mtklein@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-08-05 23:08:19 +0000
committerGravatar mtklein@google.com <mtklein@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-08-05 23:08:19 +0000
commit0d9f5f76f7c456694e5ead4c4c184c1469b2c800 (patch)
treee2bba4d46b3220e8eba188a0d95f5bcd1c58b7b9 /tests/DynamicHashTest.cpp
parentf916f9e7cf4403846c413acf8fec403e38cd8451 (diff)
old compiler is dumb
BUG= Review URL: https://codereview.chromium.org/22318002 git-svn-id: http://skia.googlecode.com/svn/trunk@10553 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests/DynamicHashTest.cpp')
-rw-r--r--tests/DynamicHashTest.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/DynamicHashTest.cpp b/tests/DynamicHashTest.cpp
index e15aad5846..4a8c3a01a2 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