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

Method UpdateCollection

libs/map/gps_track.cpp:279–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

277}
278
279void GpsTrack::UpdateCollection(bool needClear, vector<location::GpsInfo> const & points,
280 pair<size_t, size_t> & addedIds, pair<size_t, size_t> & evictedIds)
281{
282 // Apply Clear and Add points
283 // Clear points from collection, if need.
284 evictedIds = needClear ? m_collection->Clear(false /* resetIds */) : make_pair(kInvalidId, kInvalidId);
285 ;
286
287 // Add points to the collection, if need
288 if (!points.empty())
289 addedIds = m_collection->Add(points);
290 else
291 addedIds = make_pair(kInvalidId, kInvalidId);
292}
293
294void GpsTrack::NotifyCallback(pair<size_t, size_t> const & addedIds, pair<size_t, size_t> const & evictedIds)
295{

Callers

nothing calls this directly

Calls 3

ClearMethod · 0.45
emptyMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected