FastLED 3.10.8
Loading...
Searching...
No Matches

◆ shrink_to_fit()

template<typename T>
void fl::deque< T >::shrink_to_fit ( )
inline

Definition at line 563 of file deque.h.

563 {
564 if (mSize == 0) {
565 // Release every chunk and the map itself.
566 for (fl::size i = 0; i < mMapCapacity; ++i) {
568 mMap[i] = nullptr;
569 }
571 mMap = nullptr;
572 mMapCapacity = 0;
573 mFrontMapIdx = 0;
574 mFrontOffset = 0;
575 return;
576 }
577 // Release chunks outside [front .. back].
579 for (fl::size i = 0; i < mMapCapacity; ++i) {
582 mMap[i] = nullptr;
583 }
584 }
585 }
void deallocate_chunk(T *chunk) FL_NO_EXCEPT
Definition deque.h:49
fl::size mMapCapacity
Definition deque.h:39
void deallocate_map(T **map, fl::size capacity) FL_NO_EXCEPT
Definition deque.h:65
fl::size mSize
Definition deque.h:42
fl::size used_chunks() const FL_NO_EXCEPT
Definition deque.h:80
fl::size mFrontOffset
Definition deque.h:41
T ** mMap
Definition deque.h:38
fl::size mFrontMapIdx
Definition deque.h:40