Does not error or insert if no key is found
| 68 | |
| 69 | //Does not error or insert if no key is found |
| 70 | bool TryGetValue(Key key, T* value) |
| 71 | { |
| 72 | #ifdef NO_SHARED_MUTEX |
| 73 | std::unique_lock readLock(accessMutex); |
| 74 | #else |
| 75 | std::shared_lock readLock(accessMutex); |
| 76 | #endif |
| 77 | auto search = map.find(key); |
| 78 | if (search != map.end()) |
| 79 | { |
| 80 | *value = map[key]; |
| 81 | return true; |
| 82 | } |
| 83 | else |
| 84 | return false; |
| 85 | } |
| 86 | |
| 87 | bool ContainsKey(Key key) |
| 88 | { |
no test coverage detected