diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2014-05-14 23:17:17 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2014-05-14 23:18:57 +0200 |
commit | c288b17cc5a1d5051325e02a29aa40df5be6f016 (patch) | |
tree | a18b17b49cd5917c456fc2e0c1697fdbbb273195 /comphelper | |
parent | 67f85d7419a475c1e10b6b1d829bb0c575a39fbf (diff) |
Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part12
Change-Id: I7c514b7a1d86f52d77672b826b1f08b825fd7aa7
Diffstat (limited to 'comphelper')
-rw-r--r-- | comphelper/source/property/propertycontainerhelper.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/comphelper/source/property/propertycontainerhelper.cxx b/comphelper/source/property/propertycontainerhelper.cxx index b13b7f5ebead..0fd8e9ee288f 100644 --- a/comphelper/source/property/propertycontainerhelper.cxx +++ b/comphelper/source/property/propertycontainerhelper.cxx @@ -81,7 +81,7 @@ void OPropertyContainerHelper::registerProperty(const OUString& _rName, sal_Int3 { OSL_ENSURE((_nAttributes & PropertyAttribute::MAYBEVOID) == 0, "OPropertyContainerHelper::registerProperty: don't use this for properties which may be void ! There is a method called \"registerMayBeVoidProperty\" for this !"); - OSL_ENSURE(!_rMemberType.equals(::getCppuType(static_cast< Any* >(NULL))), + OSL_ENSURE(!_rMemberType.equals(cppu::UnoType<Any>::get()), "OPropertyContainerHelper::registerProperty: don't give my the type of an uno::Any ! Really can't handle this !"); OSL_ENSURE(_pPointerToMember, "OPropertyContainerHelper::registerProperty: you gave me nonsense : the pointer must be non-NULL"); @@ -109,7 +109,7 @@ void OPropertyContainerHelper::registerMayBeVoidProperty(const OUString& _rName, { OSL_ENSURE((_nAttributes & PropertyAttribute::MAYBEVOID) != 0, "OPropertyContainerHelper::registerMayBeVoidProperty: why calling this when the attributes say nothing about may-be-void ?"); - OSL_ENSURE(!_rExpectedType.equals(::getCppuType(static_cast< Any* >(NULL))), + OSL_ENSURE(!_rExpectedType.equals(cppu::UnoType<Any>::get()), "OPropertyContainerHelper::registerMayBeVoidProperty: don't give my the type of an uno::Any ! Really can't handle this !"); OSL_ENSURE(_pPointerToMember, "OPropertyContainerHelper::registerMayBeVoidProperty: you gave me nonsense : the pointer must be non-NULL"); @@ -129,7 +129,7 @@ void OPropertyContainerHelper::registerMayBeVoidProperty(const OUString& _rName, void OPropertyContainerHelper::registerPropertyNoMember(const OUString& _rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, const Type& _rType, const void* _pInitialValue) { - OSL_ENSURE(!_rType.equals(::getCppuType(static_cast< Any* >(NULL))), + OSL_ENSURE(!_rType.equals(cppu::UnoType<Any>::get()), "OPropertyContainerHelper::registerPropertyNoMember : don't give my the type of an uno::Any ! Really can't handle this !"); OSL_ENSURE(_pInitialValue || ((_nAttributes & PropertyAttribute::MAYBEVOID) != 0), "OPropertyContainerHelper::registerPropertyNoMember : you should not omit the initial value if the property can't be void ! This will definitivly crash later !"); |