We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce4522c commit 517e507Copy full SHA for 517e507
src/corelib/tools/qvector.h
@@ -315,7 +315,7 @@ void QVector<T>::detach_helper()
315
{ realloc(d->size, d->alloc); }
316
template <typename T>
317
void QVector<T>::reserve(int asize)
318
-{ if (asize > d->alloc || d->ref != 1) realloc(d->size, asize); d->capacity = 1; }
+{ if (asize > d->alloc) realloc(d->size, asize); if (d->ref == 1) d->capacity = 1; }
319
320
void QVector<T>::resize(int asize)
321
{ realloc(asize, (asize > d->alloc || (!d->capacity && asize < d->size && asize < (d->alloc >> 1))) ?
0 commit comments