diff --git a/src/corelib/tools/qvarlengtharray.h b/src/corelib/tools/qvarlengtharray.h index a6bd7847a5..b74b1fd123 100644 --- a/src/corelib/tools/qvarlengtharray.h +++ b/src/corelib/tools/qvarlengtharray.h @@ -490,7 +490,7 @@ Q_OUTOFLINE_TEMPLATE typename QVarLengthArray::iterator QVarLengthA } } else { T *b = ptr + offset; - memmove(b + 1, b, (s - offset) * sizeof(T)); + memmove(static_cast(b + 1), static_cast(b), (s - offset) * sizeof(T)); new (b) T(std::move(t)); } s += 1; @@ -518,7 +518,7 @@ Q_OUTOFLINE_TEMPLATE typename QVarLengthArray::iterator QVarLengthA } else { T *b = ptr + offset; T *i = b + n; - memmove(i, b, (s - offset - n) * sizeof(T)); + memmove(static_cast(i), static_cast(b), (s - offset - n) * sizeof(T)); while (i != b) new (--i) T(copy); } @@ -544,7 +544,7 @@ Q_OUTOFLINE_TEMPLATE typename QVarLengthArray::iterator QVarLengthA i->~T(); } } else { - memmove(ptr + f, ptr + l, (s - l) * sizeof(T)); + memmove(static_cast(ptr + f), static_cast(ptr + l), (s - l) * sizeof(T)); } s -= n; return ptr + f;