| 203 | /** Invalidates the cached data and rebuilds it. */ |
| 204 | template <class Tinst, class Tcont> |
| 205 | void CargoList<Tinst, Tcont>::InvalidateCache() |
| 206 | { |
| 207 | this->count = 0; |
| 208 | this->cargo_periods_in_transit = 0; |
| 209 | |
| 210 | for (ConstIterator it(this->packets.begin()); it != this->packets.end(); it++) { |
| 211 | static_cast<Tinst *>(this)->AddToCache(*it); |
| 212 | } |
| 213 | } |
| 214 | |
| 215 | /** |
| 216 | * Tries to merge the second packet into the first and return if that was |
no test coverage detected