src/corelib/tools/qvarlengtharray.h
changeset 7 f7bc934e204c
parent 0 1918ee327afb
--- a/src/corelib/tools/qvarlengtharray.h	Tue Feb 02 00:43:10 2010 +0200
+++ b/src/corelib/tools/qvarlengtharray.h	Wed Mar 31 11:06:36 2010 +0300
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
 ** All rights reserved.
 ** Contact: Nokia Corporation (qt-info@nokia.com)
 **
@@ -222,7 +222,6 @@
                 }
             } else {
                 qMemCopy(ptr, oldPtr, qMin(asize, osize) * sizeof(T));
-                s = asize;
             }
         } else {
             ptr = oldPtr;
@@ -233,7 +232,7 @@
     if (QTypeInfo<T>::isComplex) {
         while (osize > asize)
             (oldPtr+(--osize))->~T();
-        if( oldPtr == ptr )
+        if (!QTypeInfo<T>::isStatic)
             s = osize;
     }