QPodArrayOps: don't set the new size in eraseIf() until after copying
These are POD types, so there's nothing to be unwound in case of exceptions (and the only one that could happen is the Q_CHECK_PTR). Change-Id: I79e700614d034281bf55fffd178f91fe21685f03 Reviewed-by: Marc Mutz <marc.mutz@qt.io>bb10
parent
f6e7fdd4ad
commit
08a9fdddfd
|
|
@ -236,7 +236,7 @@ public:
|
|||
if (it == end)
|
||||
return result;
|
||||
|
||||
QPodArrayOps<T> other(this->size, this->size);
|
||||
QPodArrayOps<T> other(this->size);
|
||||
Q_CHECK_PTR(other.data());
|
||||
auto dest = other.begin();
|
||||
// std::uninitialized_copy will fallback to ::memcpy/memmove()
|
||||
|
|
|
|||
Loading…
Reference in New Issue