We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 44e3ed4 commit 7e7472aCopy full SHA for 7e7472a
Source/Utility/Containers.h
@@ -808,7 +808,7 @@ class SmallArrayImpl : public SmallArrayTemplateBase<T> {
808
template<typename U>
809
void add_array(U const& array)
810
{
811
- this->reserve(this->capacity() + array.size());
+ this->reserve(std::max<size_t>(this->capacity(), array.size()));
812
for (auto const& elt : array)
813
this->add(elt);
814
}
0 commit comments