| 60 | } |
| 61 | |
| 62 | std::unique_ptr<Maxspeeds> LoadMaxspeeds(MwmSet::MwmHandle const & handle) |
| 63 | { |
| 64 | auto const * value = handle.GetValue(); |
| 65 | CHECK(value, ()); |
| 66 | |
| 67 | try |
| 68 | { |
| 69 | auto maxspeeds = std::make_unique<Maxspeeds>(); |
| 70 | if (value->m_cont.IsExist(MAXSPEEDS_FILE_TAG)) |
| 71 | maxspeeds->Load(value->m_cont.GetReader(MAXSPEEDS_FILE_TAG)); |
| 72 | return maxspeeds; |
| 73 | } |
| 74 | catch (Reader::Exception const & e) |
| 75 | { |
| 76 | LOG(LERROR, ("File", value->GetCountryFileName(), "Error while reading", MAXSPEEDS_FILE_TAG, "section.", e.Msg())); |
| 77 | return std::make_unique<Maxspeeds>(); |
| 78 | } |
| 79 | } |
| 80 | } // namespace routing |