From 3c4febf5571e2a34846e6377688676dbd034556b Mon Sep 17 00:00:00 2001 From: Jesus Fernandez Date: Mon, 5 Dec 2016 13:50:53 +0100 Subject: Fix using 0 as null pointer Fixes: error: zero as null pointer constant. Change-Id: I850d51075263dac6dd135d3cadc136cbd08b40ab Reviewed-by: Thiago Macieira --- src/dbus/qdbuspendingreply.h | 4 ++-- src/dbus/qdbusreply.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/dbus') diff --git a/src/dbus/qdbuspendingreply.h b/src/dbus/qdbuspendingreply.h index 786eab2120..da29894d15 100644 --- a/src/dbus/qdbuspendingreply.h +++ b/src/dbus/qdbuspendingreply.h @@ -77,7 +77,7 @@ namespace QDBusPendingReplyTypes { typedef T1 Type; }; - template inline int metaTypeFor(T1 * = 0) + template inline int metaTypeFor(T1 * = nullptr) { return qMetaTypeId(); } // specialize for QVariant, allowing it to be used in place of QDBusVariant template<> inline int metaTypeFor(QVariant *) @@ -91,7 +91,7 @@ namespace QDBusPendingReplyTypes { enum { Total = Next::Total + 1 }; static inline void fillMetaTypes(int *p) { - *p = metaTypeFor(0); + *p = metaTypeFor(nullptr); Next::fillMetaTypes(++p); } }; diff --git a/src/dbus/qdbusreply.h b/src/dbus/qdbusreply.h index b6a454d240..227615024a 100644 --- a/src/dbus/qdbusreply.h +++ b/src/dbus/qdbusreply.h @@ -66,7 +66,7 @@ public: } inline QDBusReply& operator=(const QDBusMessage &reply) { - QVariant data(qMetaTypeId(), reinterpret_cast(0)); + QVariant data(qMetaTypeId(), nullptr); qDBusReplyFill(reply, m_error, data); m_data = qvariant_cast(data); return *this; -- cgit v1.2.3