summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Fernengel <harald@trolltech.com>2009-08-24 08:20:29 (GMT)
committerHarald Fernengel <harald@trolltech.com>2009-08-24 08:31:30 (GMT)
commita7d8ba4fb8ed918205815e6d8cd52c5c04365cbe (patch)
tree81615ee72cd95698dc3d3ca337cc2194a406a7f7
parent8528417ec1c064a3b8fd7fa24b1f3b193e668765 (diff)
downloadQt-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.h3
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 *));
}
}