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

◆ push_back() [2/2]

template<typename T, fl::size INLINED_SIZE>
void fl::InlinedVector< T, INLINED_SIZE >::push_back ( T && value)
inline

Definition at line 1080 of file vector.h.

1080 {
1081 if (mUsingHeap || mFixed.size() == INLINED_SIZE) {
1082 if (!mUsingHeap && mFixed.size() == INLINED_SIZE) {
1083 // transfer
1084 mHeap.clear();
1085 mHeap.reserve(INLINED_SIZE + 1);
1086 for (auto &v : mFixed) {
1087 mHeap.push_back(fl::move(v));
1088 }
1089 mFixed.clear();
1090 mUsingHeap = true;
1091 }
1092 mHeap.push_back(fl::move(value));
1093 } else {
1094 mFixed.push_back(fl::move(value));
1095 }
1096 }
HeapVector< T > mHeap
Definition vector.h:1211
FixedVector< T, INLINED_SIZE > mFixed
Definition vector.h:1210

References mFixed, mHeap, fl::move(), and mUsingHeap.

+ Here is the call graph for this function: