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

◆ reserve()

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

Definition at line 955 of file vector.h.

955 {
956 if (size > INLINED_SIZE) {
957 if (mUsingHeap) {
958 mHeap.reserve(size);
959 } else {
960 mHeap.reserve(size);
961 for (auto &v : mFixed) {
962 mHeap.push_back(v);
963 }
964 mFixed.clear();
965 mUsingHeap = true;
966 }
967 } else {
968 if (mUsingHeap) {
969 mFixed.reserve(size);
970 for (auto &v : mHeap) {
971 mFixed.push_back(v);
972 }
973 mHeap.clear();
974 mUsingHeap = false;
975 } else {
976 mFixed.reserve(size);
977 }
978 }
979 }
fl::size size() const
Definition vector.h:1008
HeapVector< T > mHeap
Definition vector.h:1211
FixedVector< T, INLINED_SIZE > mFixed
Definition vector.h:1210

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

+ Here is the call graph for this function: