From 9ecce11261e35686afa736bd31431386c89f59ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Nowacki?= Date: Tue, 3 Apr 2012 15:33:47 +0200 Subject: Remove redundant check in QMetaType::typeInfo The check was introduced when void was not a fully defined type. Change-Id: I4df8607999436f8db92be77fc8fd203fc66c2816 Reviewed-by: Stephen Kelly --- src/corelib/kernel/qmetatype.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp index 1207d995b0..53b22958c3 100644 --- a/src/corelib/kernel/qmetatype.cpp +++ b/src/corelib/kernel/qmetatype.cpp @@ -1623,7 +1623,6 @@ public: } template void delegate(const T*) { TypeInfoImpl(m_type, info); } - void delegate(const void*) {} void delegate(const QMetaTypeSwitcher::UnknownType*) {} void delegate(const QMetaTypeSwitcher::NotBuiltinType*) { customTypeInfo(m_type); } private: @@ -1645,7 +1644,7 @@ QMetaType QMetaType::typeInfo(const int type) { TypeInfo typeInfo(type); QMetaTypeSwitcher::switcher(typeInfo, type, 0); - return typeInfo.info.creator || type == Void ? QMetaType(QMetaType::NoExtensionFlags + return typeInfo.info.creator ? QMetaType(QMetaType::NoExtensionFlags , static_cast(0) // typeInfo::info is a temporary variable, we can't return address of it. , typeInfo.info.creator , typeInfo.info.deleter -- cgit v1.2.3