diff options
Diffstat (limited to 'ugc/storage.cpp')
-rw-r--r-- | ugc/storage.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ugc/storage.cpp b/ugc/storage.cpp index 15fd9babb6..fe966264a7 100644 --- a/ugc/storage.cpp +++ b/ugc/storage.cpp @@ -10,12 +10,13 @@ Storage::Storage(std::string const & filename) Load(); } -UGCUpdate const * Storage::GetUGCUpdate(FeatureID const & id) const +void Storage::GetUGCUpdate(FeatureID const & id, UGCUpdate & ugc) const { auto const it = m_ugc.find(id); - if (it != end(m_ugc)) - return &it->second; - return nullptr; + if (it == end(m_ugc)) + return; + + ugc = it->second; } void Storage::SetUGCUpdate(FeatureID const & id, UGCUpdate const & ugc) |