QContiguousCache: Remove redundant condition
The reverse condition was already checked three lines before. Change-Id: I2f78262004871ec2f3730e2a25f26fe22636cde7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 852b070529d2721d2d4e1e7ec1c90d8fe536b088) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
a441548f42
commit
67bb730beb
@ -358,7 +358,6 @@ void QContiguousCache<T>::prepend(T &&value)
|
|||||||
if (d->count != d->alloc)
|
if (d->count != d->alloc)
|
||||||
d->count++;
|
d->count++;
|
||||||
else
|
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));
|
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)
|
if (d->count != d->alloc)
|
||||||
d->count++;
|
d->count++;
|
||||||
else
|
else
|
||||||
if (d->count == d->alloc)
|
|
||||||
(d->array + d->start)->~T();
|
(d->array + d->start)->~T();
|
||||||
|
|
||||||
new (d->array + d->start) T(value);
|
new (d->array + d->start) T(value);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user