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

Function GetVersion

libs/transit/transit_version.cpp:11–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9namespace transit
10{
11TransitVersion GetVersion(Reader & reader)
12{
13 try
14 {
15 NonOwningReaderSource src(reader);
16 uint16_t headerVersion = std::numeric_limits<uint16_t>::max();
17 ReadPrimitiveFromSource(src, headerVersion);
18 CHECK_LESS(headerVersion, static_cast<uint16_t>(TransitVersion::Counter), ("Invalid transit header version."));
19
20 return static_cast<TransitVersion>(headerVersion);
21 }
22 catch (std::exception const & ex)
23 {
24 LOG(LERROR, ("Error reading header version from transit mwm section.", ex.what()));
25 throw;
26 }
27}
28} // namespace transit

Callers 3

SerializeMethod · 0.85
DoMethod · 0.85
CreateTransitGraphMethod · 0.85

Calls 2

ReadPrimitiveFromSourceFunction · 0.85
whatMethod · 0.45

Tested by

no test coverage detected