| 257 | } |
| 258 | |
| 259 | void GpsTrack::UpdateStorage(bool needClear, vector<location::GpsInfo> const & points) |
| 260 | { |
| 261 | InitStorageIfNeed(); |
| 262 | if (!m_storage) |
| 263 | return; |
| 264 | |
| 265 | try |
| 266 | { |
| 267 | if (needClear) |
| 268 | m_storage->Clear(); |
| 269 | |
| 270 | m_storage->Append(points); |
| 271 | } |
| 272 | catch (RootException const & e) |
| 273 | { |
| 274 | LOG(LWARNING, ("Track storage exception:", e.Msg())); |
| 275 | m_storage.reset(); |
| 276 | } |
| 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) |