| 42 | } |
| 43 | |
| 44 | StatEventPtr StatisticsDatabase::event(String const& name) const { |
| 45 | MutexLocker locker(m_cacheMutex); |
| 46 | return m_eventCache.get(name, [this](String const& name) -> StatEventPtr { |
| 47 | if (auto path = m_eventPaths.maybe(name)) |
| 48 | return readEvent(*path); |
| 49 | return {}; |
| 50 | }); |
| 51 | } |
| 52 | |
| 53 | AchievementPtr StatisticsDatabase::achievement(String const& name) const { |
| 54 | MutexLocker locker(m_cacheMutex); |
no test coverage detected