From 3111e6d6fad99c3759628eb416bbb446b4f0a605 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Abecasis?= Date: Fri, 6 Apr 2012 09:56:20 +0200 Subject: [PATCH] Drop unnecessary assignment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In this branch, !IS_RAW_DATA has already established that offset is sizeof(QByteArrayData) and realloc maintains the assumption. Change-Id: Ic160e36d7781d4c4f64a3b2ebec98c9cb605b3eb Reviewed-by: Thiago Macieira Reviewed-by: Jędrzej Nowacki --- src/corelib/tools/qbytearray.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp index 472da9b3d1..c8f0447739 100644 --- a/src/corelib/tools/qbytearray.cpp +++ b/src/corelib/tools/qbytearray.cpp @@ -1459,7 +1459,6 @@ void QByteArray::reallocData(uint alloc, bool grow) Data *x = static_cast(::realloc(d, sizeof(Data) + alloc)); Q_CHECK_PTR(x); x->alloc = alloc; - x->offset = sizeof(QByteArrayData); d = x; } }