Fix Clang warning about memcpy a class with vtables
Change-Id: I7966014a49cdf4c6c82f012d8b1d16ba8ddc3fcc Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This commit is contained in:
parent
96b48ee0cb
commit
9ea5754291
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user