From e3b78896d21000c759ccc1e2781a471327307710 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Wed, 31 Oct 2012 10:05:46 +0100 Subject: Fix warnings when using QImage as QtConcurrent::mapped return type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-27391 Change-Id: I68b37ffa645be21d4d23b205bc052540b9aba7f4 Reviewed-by: Olivier Goffart Reviewed-by: João Abecasis --- src/corelib/tools/qvector.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/corelib/tools') 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::defaultConstruct(T *from, T *to) new (from++) T(); } } else { - ::memset(from, 0, (to - from) * sizeof(T)); + ::memset(static_cast(from), 0, (to - from) * sizeof(T)); } } @@ -267,7 +267,7 @@ void QVector::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(dstFrom), static_cast(srcFrom), (srcTo - srcFrom) * sizeof(T)); } } @@ -467,7 +467,7 @@ void QVector::reallocData(const int asize, const int aalloc, QArrayData::Allo new (dst++) T(*srcBegin++); } } else { - ::memcpy(static_cast(dst), srcBegin, (srcEnd - srcBegin) * sizeof(T)); + ::memcpy(static_cast(dst), static_cast(srcBegin), (srcEnd - srcBegin) * sizeof(T)); dst += srcEnd - srcBegin; // destruct unused / not moved data -- cgit v1.2.3