diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-04-02 17:03:09 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-04-02 17:03:09 +0000 |
commit | 158f64626f8dae7e8437744184860d0110b88609 (patch) | |
tree | 94861ac55b3d8a21ae556fb1602d1dabf95deac0 /tests/DynamicHashTest.cpp | |
parent | 52ffbf6be05eb30671529ec86268967fb85c9810 (diff) |
SkTDynamicHash: remove need for Equals(const T&, const Key&) param.
All implementations are relying on bool operator==(const Key&, const Key&)
anyway, which makes total sense, so just make that required.
BUG=skia:
R=bsalomon@google.com, mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/222343002
git-svn-id: http://skia.googlecode.com/svn/trunk@14027 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests/DynamicHashTest.cpp')
-rw-r--r-- | tests/DynamicHashTest.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/DynamicHashTest.cpp b/tests/DynamicHashTest.cpp index b2d0f0382c..bb9367b46d 100644 --- a/tests/DynamicHashTest.cpp +++ b/tests/DynamicHashTest.cpp @@ -17,9 +17,8 @@ struct Entry { 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, GetKey, GetHash, AreEqual> { +class Hash : public SkTDynamicHash<Entry, int, GetKey, GetHash> { public: Hash() : INHERITED() {} @@ -28,7 +27,7 @@ public: int countCollisions(const int& key) const { return this->INHERITED::countCollisions(key); } private: - typedef SkTDynamicHash<Entry, int, GetKey, GetHash, AreEqual> INHERITED; + typedef SkTDynamicHash<Entry, int, GetKey, GetHash> INHERITED; }; } // namespace |