From 05d24aed2335758d8785179c67931276fbd89e5a Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Thu, 13 Jun 2019 12:56:54 -0700 Subject: [PATCH] Avoid using std::unary_function (flutter/engine#9314) --- engine/src/flutter/third_party/txt/src/utils/LruCache.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/engine/src/flutter/third_party/txt/src/utils/LruCache.h b/engine/src/flutter/third_party/txt/src/utils/LruCache.h index 95ee8aa145..cb2adb7ddc 100644 --- a/engine/src/flutter/third_party/txt/src/utils/LruCache.h +++ b/engine/src/flutter/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(); };