33template<
class T,
int SizeMin>
36 const labelRange& slice
44 else if (slice.after() >= this->size())
47 this->
resize(slice.first());
52 label j = slice.first();
53 const label len = this->size();
55 for (label i = slice.after(); i < len; ++i, ++j)
57 Foam::Swap(this->
operator[](i), this->
operator[](j));
60 resize(this->size() - slice.size());
67template<
class T,
int SizeMin>
70 const labelRange& slice
73 if (slice.first() > 0)
76 label j = slice.
first();
77 const label len = slice.size();
79 for (label i = 0; i < len; ++i, ++j)
81 Foam::Swap(this->
operator[](i), this->
operator[](j));
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
T & first()
Return the first element of the list.
patchWriters resize(patchIds.size())
void Swap(DynamicList< T, SizeMinA > &a, DynamicList< T, SizeMinB > &b)