| 1206 | } |
| 1207 | |
| 1208 | LocalFilePtr Storage::GetLocalFile(CountryId const & countryId, int64_t version) const |
| 1209 | { |
| 1210 | auto const it = m_localFiles.find(countryId); |
| 1211 | if (it == m_localFiles.end() || it->second.empty()) |
| 1212 | return LocalFilePtr(); |
| 1213 | |
| 1214 | for (auto const & file : it->second) |
| 1215 | if (file->GetVersion() == version) |
| 1216 | return file; |
| 1217 | return LocalFilePtr(); |
| 1218 | } |
| 1219 | |
| 1220 | void Storage::RegisterCountryFiles(LocalFilePtr localFile) |
| 1221 | { |