Make QWeakPointer's ctor constexpr

Change-Id: Ia23406ee80e83071a129606b76f78e2b6d0cf32e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Giuseppe D'Angelo 2014-05-29 12:24:35 +02:00 committed by The Qt Project
parent e2df05f120
commit 51f6651d4c

View File

@ -582,7 +582,7 @@ public:
inline bool operator !() const { return isNull(); }
inline T *data() const { return d == 0 || d->strongref.load() == 0 ? 0 : value; }
inline QWeakPointer() : d(0), value(0) { }
Q_DECL_CONSTEXPR inline QWeakPointer() : d(0), value(0) { }
inline ~QWeakPointer() { if (d && !d->weakref.deref()) delete d; }
#ifndef QT_NO_QOBJECT