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 885 of file vector.h.

885 {
886 if (size > INLINED_SIZE) {
887 if (mUsingHeap) {
888 mHeap.resize(size);
889 } else {
890 mHeap.resize(size);
891 for (auto &v : mFixed) {
892 mHeap.push_back(v);
893 }
894 mFixed.clear();
895 mUsingHeap = true;
896 }
897 } else {
898 if (mUsingHeap) {
899 mFixed.resize(size);
900 for (auto &v : mHeap) {
901 mFixed.push_back(v);
902 }
903 mHeap.clear();
904 mUsingHeap = false;
905 } else {
906 mFixed.resize(size);
907 }
908 }
909 }
HeapVector< T > mHeap
Definition vector.h:1071
FixedVector< T, INLINED_SIZE > mFixed
Definition vector.h:1070
size_t size() const
Definition vector.h:912

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

+ Here is the call graph for this function: