Fix Clang warning about memcpy a class with vtables

Change-Id: I7966014a49cdf4c6c82f012d8b1d16ba8ddc3fcc
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This commit is contained in:
Thiago Macieira 2012-12-22 00:47:47 -08:00 committed by The Qt Project
parent 96b48ee0cb
commit 9ea5754291

View File

@ -368,7 +368,7 @@ Q_INLINE_TEMPLATE void QList<T>::node_construct(Node *n, const T &t)
else *reinterpret_cast<T*>(n) = t;
#else
// This is always safe, but penaltizes unoptimized builds a lot.
else ::memcpy(n, &t, sizeof(T));
else ::memcpy(n, static_cast<const void *>(&t), sizeof(T));
#endif
}