diff options
author | Harald Fernengel <harald@trolltech.com> | 2009-08-24 08:20:29 (GMT) |
---|---|---|
committer | Harald Fernengel <harald@trolltech.com> | 2009-08-24 08:31:30 (GMT) |
commit | a7d8ba4fb8ed918205815e6d8cd52c5c04365cbe (patch) | |
tree | 81615ee72cd95698dc3d3ca337cc2194a406a7f7 | |
parent | 8528417ec1c064a3b8fd7fa24b1f3b193e668765 (diff) | |
download | Qt-a7d8ba4fb8ed918205815e6d8cd52c5c04365cbe.zip Qt-a7d8ba4fb8ed918205815e6d8cd52c5c04365cbe.tar.gz Qt-a7d8ba4fb8ed918205815e6d8cd52c5c04365cbe.tar.bz2 |
Revert "Remove the unnecessary double memcpy now too."
This reverts commit 10a0ed3f2e6a71eced5f470f1c3e09d7be58bbc9.
-rw-r--r-- | src/corelib/tools/qlist.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h index 5fa0f6c..ab6f7bd 100644 --- a/src/corelib/tools/qlist.h +++ b/src/corelib/tools/qlist.h @@ -381,6 +381,9 @@ Q_INLINE_TEMPLATE void QList<T>::node_copy(Node *from, Node *to, Node *src) (reinterpret_cast<T*>(current--))->~T(); QT_RETHROW; } + } else { + if (src != from && to - from > 0) + memcpy(from, src, (to - from) * sizeof(Node *)); } } |