From 632840cb0f5ad355d87fc040b015d04af86371ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Abecasis?= Date: Wed, 1 Feb 2012 11:51:08 +0100 Subject: Make clear() use the shared null inline There isn't a good reason to impose the additional library call and using the shared null here matches existing behavior in QByteArray, QString and QVector. Change-Id: Idd0bb9c7411db52630402534a11d87cbf2b1e7ba Reviewed-by: Robin Burchell --- src/corelib/tools/qarraydatapointer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/tools/qarraydatapointer.h') diff --git a/src/corelib/tools/qarraydatapointer.h b/src/corelib/tools/qarraydatapointer.h index 8b5752bc70..215549a2ee 100644 --- a/src/corelib/tools/qarraydatapointer.h +++ b/src/corelib/tools/qarraydatapointer.h @@ -141,7 +141,7 @@ public: void clear() { QArrayDataPointer tmp(d); - d = Data::allocate(0); + d = Data::sharedNull(); } bool detach() -- cgit v1.2.3