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

◆ push_back() [1/2]

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

Definition at line 1061 of file vector.h.

1061 {
1062 if (mUsingHeap || mFixed.size() == INLINED_SIZE) {
1063 if (!mUsingHeap && mFixed.size() == INLINED_SIZE) {
1064 // transfer
1065 mHeap.clear();
1066 mHeap.reserve(INLINED_SIZE + 1);
1067 for (auto &v : mFixed) {
1068 mHeap.push_back(fl::move(v));
1069 }
1070 mFixed.clear();
1071 mUsingHeap = true;
1072 }
1073 mHeap.push_back(value);
1074 } else {
1075 mFixed.push_back(value);
1076 }
1077 }
HeapVector< T > mHeap
Definition vector.h:1211
FixedVector< T, INLINED_SIZE > mFixed
Definition vector.h:1210

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

Referenced by loop(), and anonymous_namespace{xypaths.cpp}::make_path().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: