| 25 | } |
| 26 | |
| 27 | std::unique_ptr<CityRoads> LoadCityRoads(MwmSet::MwmHandle const & handle) |
| 28 | { |
| 29 | auto const * value = handle.GetValue(); |
| 30 | CHECK(value, ()); |
| 31 | |
| 32 | try |
| 33 | { |
| 34 | auto cityRoads = std::make_unique<CityRoads>(); |
| 35 | if (value->m_cont.IsExist(CITY_ROADS_FILE_TAG)) |
| 36 | cityRoads->Load(value->m_cont.GetReader(CITY_ROADS_FILE_TAG)); |
| 37 | return cityRoads; |
| 38 | } |
| 39 | catch (Reader::Exception const & e) |
| 40 | { |
| 41 | LOG(LERROR, ("File", value->GetCountryFileName(), "Error while reading", CITY_ROADS_FILE_TAG, "section.", e.Msg())); |
| 42 | return std::make_unique<CityRoads>(); |
| 43 | } |
| 44 | } |
| 45 | } // namespace routing |
no test coverage detected