Revert "Use memmove in QListData::append(int) as regions overlap."
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>
Wed, 26 Oct 2011 12:24:51 +0000 (14:24 +0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 26 Oct 2011 16:06:39 +0000 (18:06 +0200)
We have proven that the regions cannot overlap. The root problem must be
somewhere else.

This reverts commit d96b7b809e614dd416709acec768529457120b9f.

Change-Id: I3446487f2a1a5bd322379b8adb788c26ff3e08e2
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
src/corelib/tools/qlist.cpp

index 0daec4d..94be78e 100644 (file)
@@ -164,7 +164,7 @@ void **QListData::append(int n)
         if (b - n >= 2 * d->alloc / 3) {
             // we have enough space. Just not at the end -> move it.
             e -= b;
-            ::memmove(d->array, d->array + b, e * sizeof(void *));
+            ::memcpy(d->array, d->array + b, e * sizeof(void *));
             d->begin = 0;
         } else {
             realloc(grow(d->alloc + n));