diff options
author | Harald Fernengel <harald@trolltech.com> | 2009-08-24 10:20:29 +0200 |
---|---|---|
committer | Harald Fernengel <harald@trolltech.com> | 2009-08-24 10:31:30 +0200 |
commit | a7d8ba4fb8ed918205815e6d8cd52c5c04365cbe (patch) | |
tree | 81615ee72cd95698dc3d3ca337cc2194a406a7f7 | |
parent | 8528417ec1c064a3b8fd7fa24b1f3b193e668765 (diff) |
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 5fa0f6cfa..ab6f7bd0f 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 *)); } } |