QContiguousCache: Remove redundant condition

The reverse condition was already checked three lines before.

Pick-to: 6.1
Change-Id: I2f78262004871ec2f3730e2a25f26fe22636cde7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Wang Yu 2021-03-04 10:54:50 +08:00
parent 9fb81fc287
commit 852b070529

View File

@ -358,8 +358,7 @@ void QContiguousCache<T>::prepend(T &&value)
if (d->count != d->alloc)
d->count++;
else
if (d->count == d->alloc)
(d->array + d->start)->~T();
(d->array + d->start)->~T();
new (d->array + d->start) T(std::move(value));
}
@ -379,7 +378,6 @@ void QContiguousCache<T>::prepend(const T &value)
if (d->count != d->alloc)
d->count++;
else
if (d->count == d->alloc)
(d->array + d->start)->~T();
new (d->array + d->start) T(value);