| 316 | |
| 317 | template<class View> |
| 318 | void |
| 319 | CachedView<View>::cache(Space& home) { |
| 320 | _firstRange->dispose(home,_lastRange); |
| 321 | ViewRanges<View> xr(x); |
| 322 | _firstRange = new (home) RangeList(xr.min(),xr.max(),nullptr); |
| 323 | ++xr; |
| 324 | RangeList* cur = _firstRange; |
| 325 | for (; xr(); ++xr) { |
| 326 | RangeList* next = new (home) RangeList(xr.min(),xr.max(),nullptr); |
| 327 | cur->next(next); |
| 328 | cur = next; |
| 329 | } |
| 330 | _lastRange = cur; |
| 331 | _size = x.size(); |
| 332 | } |
| 333 | |
| 334 | template<class View> |
| 335 | forceinline bool |