MCPcopy Create free account
hub / github.com/comaps/comaps / LoadMaxspeeds

Function LoadMaxspeeds

libs/routing/maxspeeds.cpp:62–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60}
61
62std::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

Callers 2

TestMaxspeedsSectionFunction · 0.85
ShowInfoPopupMethod · 0.85

Calls 5

IsExistMethod · 0.80
GetCountryFileNameMethod · 0.80
GetValueMethod · 0.45
LoadMethod · 0.45
GetReaderMethod · 0.45

Tested by 1

TestMaxspeedsSectionFunction · 0.68