| 277 | } |
| 278 | |
| 279 | void 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 | |
| 294 | void GpsTrack::NotifyCallback(pair<size_t, size_t> const & addedIds, pair<size_t, size_t> const & evictedIds) |
| 295 | { |