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

Function CalculateCacheSize

libs/map/transit/transit_reader.cpp:41–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39size_t constexpr kMaxTransitCacheSizeBytes = 5 /* Mb */ * 1024 * 1024;
40
41size_t CalculateCacheSize(TransitDisplayInfo const & transitInfo)
42{
43 size_t constexpr kSegmentSize = 72;
44 size_t cacheSize = 0;
45 for (auto const & shape : transitInfo.m_shapesSubway)
46 cacheSize += shape.second.GetPolyline().size() * kSegmentSize;
47 return cacheSize;
48}
49} // namespace
50
51// ReadTransitTask --------------------------------------------------------------------------------

Callers 1

UpdateViewportMethod · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected