FastLED 3.9.15
Loading...
Searching...
No Matches

◆ resize()

template<typename T, size_t INLINED_SIZE>
void fl::InlinedVector< T, INLINED_SIZE >::resize ( size_t size)
inline

Definition at line 839 of file vector.h.

839 {
840 if (size > INLINED_SIZE) {
841 if (mUsingHeap) {
842 mHeap.resize(size);
843 } else {
844 mHeap.resize(size);
845 for (auto &v : mFixed) {
846 mHeap.push_back(v);
847 }
848 mFixed.clear();
849 mUsingHeap = true;
850 }
851 } else {
852 if (mUsingHeap) {
853 mFixed.resize(size);
854 for (auto &v : mHeap) {
855 mFixed.push_back(v);
856 }
857 mHeap.clear();
858 mUsingHeap = false;
859 } else {
860 mFixed.resize(size);
861 }
862 }
863 }
HeapVector< T > mHeap
Definition vector.h:1025
FixedVector< T, INLINED_SIZE > mFixed
Definition vector.h:1024
size_t size() const
Definition vector.h:866

References mFixed, mHeap, mUsingHeap, and size().

+ Here is the call graph for this function: