FastLED 3.9.15
Loading...
Searching...
No Matches

◆ find_value() [1/2]

template<typename Key, typename T, typename Hash = Hash<Key>, typename KeyEqual = EqualTo<Key>, int INLINED_COUNT = FASTLED_HASHMAP_INLINED_COUNT>
T * fl::HashMapLru< Key, T, Hash, KeyEqual, INLINED_COUNT >::find_value ( const Key & key)
inline

Definition at line 75 of file hash_map_lru.h.

75 {
76 ValueWithTimestamp *vwt = mMap.find_value(key);
77 if (vwt) {
78 // Update access time
79 auto curr = mCurrentTime++;
80 vwt->last_access_time = curr;
81 return &vwt->value;
82 }
83 return nullptr;
84 }
HashMap< Key, ValueWithTimestamp, Hash, KeyEqual, INLINED_COUNT > mMap
uint32_t mCurrentTime

References fl::HashMapLru< Key, T, Hash, KeyEqual, INLINED_COUNT >::ValueWithTimestamp::last_access_time, mCurrentTime, mMap, and fl::HashMapLru< Key, T, Hash, KeyEqual, INLINED_COUNT >::ValueWithTimestamp::value.