AK: Optimize Vector::append(Vector&&) for case where this->m_impl is null.

This commit is contained in:
Andreas Kling 2019-02-07 09:08:59 +01:00
parent 443d1c2237
commit 44e1a45b2a

View file

@ -172,6 +172,10 @@ public:
void append(Vector<T>&& other)
{
if (!m_impl) {
m_impl = move(other.m_impl);
return;
}
Vector<T> tmp = move(other);
ensure_capacity(size() + tmp.size());
for (auto&& v : tmp) {