Commit 39215d6b authored by NICLAUSSE Nicolas's avatar NICLAUSSE Nicolas
Browse files

Merge branch 'master' of github.com:d-tk/dtk

parents 76f29166 4f982725
......@@ -701,7 +701,7 @@ template <typename T, qlonglong PreallocSize> inline void dtkArray<T, PreallocSi
Q_ASSERT_X(index >= 0 && length >= 0, "dtkArray<T, PreallocSize>::setAt", "index out of range or negative length");
if (length != 0) {
quintptr newSize = qMax(d->size, index + length);
quintptr newSize = qMax((quintptr)d->size, (quintptr)(index + length));
const bool isTooSmall = newSize > d->alloc;
if (!isDetached() || isTooSmall) {
dtkArrayData::AllocationOptions opt(isTooSmall ? dtkArrayData::Grow : dtkArrayData::Default);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment