* Retrieves a value from a dictionary. * * @param key The key whose value should be retrieved. * @returns The value of an empty value if the key was not found. */
| 36 | * @returns The value of an empty value if the key was not found. |
| 37 | */ |
| 38 | Value Dictionary::Get(const String& key) const |
| 39 | { |
| 40 | std::shared_lock<std::shared_timed_mutex> lock (m_DataMutex); |
| 41 | |
| 42 | auto it = m_Data.find(key); |
| 43 | |
| 44 | if (it == m_Data.end()) |
| 45 | return Empty; |
| 46 | |
| 47 | return it->second; |
| 48 | } |
| 49 | |
| 50 | /** |
| 51 | * Retrieves a value from a dictionary. |