summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@digia.com>2012-10-31 10:05:46 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-02 00:38:51 +0100
commite3b78896d21000c759ccc1e2781a471327307710 (patch)
treeaf0d703daddc6ae32fb7c3f55ab2da9e851db983 /src
parent30542304f19fe967b29f71c67cdcc782dc1fa1a8 (diff)
Fix warnings when using QImage as QtConcurrent::mapped return type
Task-number: QTBUG-27391 Change-Id: I68b37ffa645be21d4d23b205bc052540b9aba7f4 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: João Abecasis <joao@abecasis.name>
Diffstat (limited to 'src')
-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