| Index: Source/wtf/Vector.h
|
| diff --git a/Source/wtf/Vector.h b/Source/wtf/Vector.h
|
| index 4eefbcb3d09419dc98143a5afd1c9bff06b36be6..dce525fdd0093cde3792a9e6a815fded01bacb7f 100644
|
| --- a/Source/wtf/Vector.h
|
| +++ b/Source/wtf/Vector.h
|
| @@ -835,13 +835,12 @@ static const size_t kInitialVectorSize = WTF_VECTOR_INITIAL_SIZE;
|
| template<typename T, size_t inlineCapacity>
|
| void Vector<T, inlineCapacity>::reserveCapacity(size_t newCapacity)
|
| {
|
| - if (newCapacity <= capacity())
|
| + if (UNLIKELY(newCapacity <= capacity()))
|
| return;
|
| T* oldBuffer = begin();
|
| T* oldEnd = end();
|
| Base::allocateBuffer(newCapacity);
|
| - if (begin())
|
| - TypeOperations::move(oldBuffer, oldEnd, begin());
|
| + TypeOperations::move(oldBuffer, oldEnd, begin());
|
| Base::deallocateBuffer(oldBuffer);
|
| }
|
|
|
|
|