Avoid using std::unary_function (flutter/engine#9314)

This commit is contained in:
Chinmay Garde
2019-06-13 12:56:54 -07:00
committed by GitHub
parent 73b80c1efb
commit 05d24aed23

View File

@@ -85,14 +85,13 @@ class LruCache {
const TKey& getKey() const final { return key; }
};
struct HashForEntry : public std::unary_function<KeyedEntry*, hash_t> {
struct HashForEntry {
size_t operator()(const KeyedEntry* entry) const {
return hash_type(entry->getKey());
};
};
struct EqualityForHashedEntries
: public std::unary_function<KeyedEntry*, hash_t> {
struct EqualityForHashedEntries {
bool operator()(const KeyedEntry* lhs, const KeyedEntry* rhs) const {
return lhs->getKey() == rhs->getKey();
};