From 5e3c4b6a82df640c15778af72384c6b27f8860b7 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 19 Jan 2011 16:19:51 +0100 Subject: Fix warning in sun compiler Warning, nullref: Initializing const myClass& to a NULL value. Patch inspired by the one in QTBUG-16755 Task-number: QTBUG-16755 --- src/corelib/kernel/qobject.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/corelib/kernel/qobject.h b/src/corelib/kernel/qobject.h index 63fdf76..bd3ef3c 100644 --- a/src/corelib/kernel/qobject.h +++ b/src/corelib/kernel/qobject.h @@ -370,18 +370,18 @@ template inline T qobject_cast(QObject *object) { #if !defined(QT_NO_QOBJECT_CHECK) - reinterpret_cast(0)->qt_check_for_QOBJECT_macro(*reinterpret_cast(object)); + reinterpret_cast(object)->qt_check_for_QOBJECT_macro(*reinterpret_cast(object)); #endif - return static_cast(reinterpret_cast(0)->staticMetaObject.cast(object)); + return static_cast(reinterpret_cast(object)->staticMetaObject.cast(object)); } template inline T qobject_cast(const QObject *object) { #if !defined(QT_NO_QOBJECT_CHECK) - reinterpret_cast(0)->qt_check_for_QOBJECT_macro(*reinterpret_cast(const_cast(object))); + reinterpret_cast(object)->qt_check_for_QOBJECT_macro(*reinterpret_cast(const_cast(object))); #endif - return static_cast(reinterpret_cast(0)->staticMetaObject.cast(object)); + return static_cast(reinterpret_cast(object)->staticMetaObject.cast(object)); } -- cgit v0.12