Skip to content

Commit

Permalink
Avoid using std::unary_function (flutter#9314)
Browse files Browse the repository at this point in the history
  • Loading branch information
chinmaygarde authored Jun 13, 2019
1 parent 031c2dc commit 54ff3c5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions third_party/txt/src/utils/LruCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
};
Expand Down

0 comments on commit 54ff3c5

Please sign in to comment.