SpiecsEngine
 
Loading...
Searching...
No Matches

◆ find_value()

template<typename K , typename V >
V * scl::linked_unordered_map< K, V >::find_value ( const K & key)
inline

Find the value by key.

Parameters
[in]keyK the key.
Returns
Returns the value that founded.

Definition at line 197 of file LinkedUnorderedMap.h.

198 {
199 bool hasKey = has_key(key);
200
201 std::shared_lock<std::shared_mutex> lock(m_Mutex);
202
203 if (hasKey)
204 {
205 return &m_Map[key];
206 }
207
208 return nullptr;
209 }
std::shared_mutex m_Mutex
Mutex for this container.
std::unordered_map< K, V > m_Map
bool has_key(const K &key)
Determine whether the key is in the container.

References scl::linked_unordered_map< K, V >::has_key().