summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qvector.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/tools/qvector.h')
-rw-r--r--src/corelib/tools/qvector.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h
index 94733f77da..2c688db507 100644
--- a/src/corelib/tools/qvector.h
+++ b/src/corelib/tools/qvector.h
@@ -252,7 +252,7 @@ void QVector<T>::defaultConstruct(T *from, T *to)
new (from++) T();
}
} else {
- ::memset(from, 0, (to - from) * sizeof(T));
+ ::memset(static_cast<void *>(from), 0, (to - from) * sizeof(T));
}
}
@@ -267,7 +267,7 @@ void QVector<T>::copyConstruct(const T *srcFrom, const T *srcTo, T *dstFrom)
while (srcFrom != srcTo)
new (dstFrom++) T(*srcFrom++);
} else {
- ::memcpy(dstFrom, srcFrom, (srcTo - srcFrom) * sizeof(T));
+ ::memcpy(static_cast<void *>(dstFrom), static_cast<const void *>(srcFrom), (srcTo - srcFrom) * sizeof(T));
}
}
@@ -467,7 +467,7 @@ void QVector<T>::reallocData(const int asize, const int aalloc, QArrayData::Allo
new (dst++) T(*srcBegin++);
}
} else {
- ::memcpy(static_cast<void *>(dst), srcBegin, (srcEnd - srcBegin) * sizeof(T));
+ ::memcpy(static_cast<void *>(dst), static_cast<void *>(srcBegin), (srcEnd - srcBegin) * sizeof(T));
dst += srcEnd - srcBegin;
// destruct unused / not moved data