From 50bbb3729b350392021d95259b99d401a85686ea Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Thu, 13 Jun 2019 12:12:15 -0700 Subject: [PATCH] Avoid using std::unary_function --- third_party/txt/src/utils/LruCache.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/third_party/txt/src/utils/LruCache.h b/third_party/txt/src/utils/LruCache.h index 95ee8aa145031..cb2adb7ddc895 100644 --- a/third_party/txt/src/utils/LruCache.h +++ b/third_party/txt/src/utils/LruCache.h @@ -85,14 +85,13 @@ class LruCache { const TKey& getKey() const final { return key; } }; - struct HashForEntry : public std::unary_function { + struct HashForEntry { size_t operator()(const KeyedEntry* entry) const { return hash_type(entry->getKey()); }; }; - struct EqualityForHashedEntries - : public std::unary_function { + struct EqualityForHashedEntries { bool operator()(const KeyedEntry* lhs, const KeyedEntry* rhs) const { return lhs->getKey() == rhs->getKey(); };