summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2011-09-12 08:44:32 +0200
committerQt by Nokia <qt-info@nokia.com>2011-09-23 11:03:06 +0200
commiteb1f41b8c186614392cff5b7b51c86e5f5c4e2b6 (patch)
treeca15d8a55a398450c374e91a30a8e55c897278b0 /src
parentcfc39289baa8ee0a1bd055ff1bc4636694262ae8 (diff)
Don't call ref() in QByteArray::QByteArray()
The call is unnecessary; it does nothing since the shared_null ref count is negative. Change-Id: I0d0c35a554e4fc5b734a25dab06f04bee7a9ae24 Reviewed-on: http://codereview.qt-project.org/4637 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/tools/qbytearray.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qbytearray.h b/src/corelib/tools/qbytearray.h
index b70dba4d55..fdd34b3935 100644
--- a/src/corelib/tools/qbytearray.h
+++ b/src/corelib/tools/qbytearray.h
@@ -402,7 +402,7 @@ public:
inline DataPtr &data_ptr() { return d; }
};
-inline QByteArray::QByteArray(): d(const_cast<Data *>(&shared_null.ba)) { d->ref.ref(); }
+inline QByteArray::QByteArray(): d(const_cast<Data *>(&shared_null.ba)) { }
inline QByteArray::~QByteArray() { if (!d->ref.deref()) qFree(d); }
inline int QByteArray::size() const
{ return d->size; }