https://bugs.kde.org/show_bug.cgi?id=367484

Sergio Martins <smart...@kde.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |CONFIRMED

--- Comment #3 from Sergio Martins <smart...@kde.org> ---
(In reply to Mathias Hasselmann from comment #2)
> (In reply to Sergio Martins from comment #1)
> > Wouldn't a reserve make sense in that example ?
> Not at all. The purpose of QVarLengthArray is to save the reserve, or rather
> to do it right on the stack - therefore the pre-alloc parameter.

I usually use QVarLengthArray::reserve() anyway, since QVLA will use the heap
when bigger than preallocSize. reserve(X) is a NO-OP for the cases where X <=
preallocSize, so there's no harm.

But I understand the warning is annoying for you, since it's all using compile
time constants so there's no chance of spilling onto the heap.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to