diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:12:56 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:31:20 +0100 |
commit | 4730b58d9989512ed25790768ba78decfde7d667 (patch) | |
tree | 2d53902a514a0f69a70dc0bc7bebe6d39290e1be /include/com | |
parent | 311fd06af4e297fa748684a61edd3ee38845c485 (diff) |
loplugin:nullptr (automatic rewrite)
Change-Id: I17eb40b2923793280ea220e519f97563c8490a19
Diffstat (limited to 'include/com')
-rw-r--r-- | include/com/sun/star/uno/Any.hxx | 2 | ||||
-rw-r--r-- | include/com/sun/star/uno/Reference.h | 2 | ||||
-rw-r--r-- | include/com/sun/star/uno/Reference.hxx | 12 | ||||
-rw-r--r-- | include/com/sun/star/uno/Sequence.hxx | 8 | ||||
-rw-r--r-- | include/com/sun/star/uno/Type.hxx | 6 | ||||
-rw-r--r-- | include/com/sun/star/uno/genfunc.hxx | 4 |
6 files changed, 17 insertions, 17 deletions
diff --git a/include/com/sun/star/uno/Any.hxx b/include/com/sun/star/uno/Any.hxx index 09d3a148c5ff..9f0de98acf1a 100644 --- a/include/com/sun/star/uno/Any.hxx +++ b/include/com/sun/star/uno/Any.hxx @@ -51,7 +51,7 @@ namespace uno inline Any::Any() { - ::uno_any_construct( this, 0, 0, cpp_acquire ); + ::uno_any_construct( this, NULL, NULL, cpp_acquire ); } diff --git a/include/com/sun/star/uno/Reference.h b/include/com/sun/star/uno/Reference.h index a4bdf7c6fbba..58009a3d7da9 100644 --- a/include/com/sun/star/uno/Reference.h +++ b/include/com/sun/star/uno/Reference.h @@ -90,7 +90,7 @@ public: @return true if reference acquires an interface, i.e. true if it is not null */ inline bool SAL_CALL is() const - { return (0 != _pInterface); } + { return (NULL != _pInterface); } /** Equality operator: compares two interfaces Checks if both references are null or refer to the same object. diff --git a/include/com/sun/star/uno/Reference.hxx b/include/com/sun/star/uno/Reference.hxx index 1ba4e48d2524..7e8b4db279e2 100644 --- a/include/com/sun/star/uno/Reference.hxx +++ b/include/com/sun/star/uno/Reference.hxx @@ -51,11 +51,11 @@ inline XInterface * BaseReference::iquery( if (typelib_TypeClass_INTERFACE == aRet.pType->eTypeClass) { XInterface * pRet = static_cast< XInterface * >( aRet.pReserved ); - aRet.pReserved = 0; + aRet.pReserved = NULL; return pRet; } } - return 0; + return NULL; } template< class interface_type > @@ -167,7 +167,7 @@ template< class interface_type > inline Reference< interface_type >::Reference( const Any & rAny, UnoReference_Query ) { _pInterface = (typelib_TypeClass_INTERFACE == rAny.pType->eTypeClass - ? iquery( static_cast< XInterface * >( rAny.pReserved ) ) : 0); + ? iquery( static_cast< XInterface * >( rAny.pReserved ) ) : NULL); } template< class interface_type > @@ -186,7 +186,7 @@ template< class interface_type > inline Reference< interface_type >::Reference( const Any & rAny, UnoReference_QueryThrow ) { _pInterface = iquery_throw( typelib_TypeClass_INTERFACE == rAny.pType->eTypeClass - ? static_cast< XInterface * >( rAny.pReserved ) : 0 ); + ? static_cast< XInterface * >( rAny.pReserved ) : NULL ); } template< class interface_type > @@ -275,7 +275,7 @@ inline bool Reference< interface_type >::set( castFromXInterface( iquery( rAny.pType->eTypeClass == typelib_TypeClass_INTERFACE - ? static_cast< XInterface * >( rAny.pReserved ) : 0 )), + ? static_cast< XInterface * >( rAny.pReserved ) : NULL )), SAL_NO_ACQUIRE ); } @@ -302,7 +302,7 @@ inline void Reference< interface_type >::set( set( castFromXInterface( iquery_throw( rAny.pType->eTypeClass == typelib_TypeClass_INTERFACE - ? static_cast< XInterface * >( rAny.pReserved ) : 0 )), + ? static_cast< XInterface * >( rAny.pReserved ) : NULL )), SAL_NO_ACQUIRE ); } diff --git a/include/com/sun/star/uno/Sequence.hxx b/include/com/sun/star/uno/Sequence.hxx index b23283e1d896..c52293223fed 100644 --- a/include/com/sun/star/uno/Sequence.hxx +++ b/include/com/sun/star/uno/Sequence.hxx @@ -41,7 +41,7 @@ namespace uno /// @cond INTERNAL template< class E > -typelib_TypeDescriptionReference * Sequence< E >::s_pType = 0; +typelib_TypeDescriptionReference * Sequence< E >::s_pType = NULL; /// @endcond template< class E > @@ -230,8 +230,8 @@ getTypeFavourChar( { //TODO On certain platforms with weak memory models, the following code can // result in some threads observing that td points to garbage: - static typelib_TypeDescriptionReference * td = 0; - if (td == 0) { + static typelib_TypeDescriptionReference * td = NULL; + if (td == NULL) { ::typelib_static_sequence_type_init( &td, (::cppu::getTypeFavourChar( @@ -274,7 +274,7 @@ SAL_CALL getCppuSequenceType( const ::com::sun::star::uno::Type & rElementType ) inline const ::com::sun::star::uno::Type & SAL_CALL getCharSequenceCppuType() { - static typelib_TypeDescriptionReference * s_pType_com_sun_star_uno_Sequence_Char = 0; + static typelib_TypeDescriptionReference * s_pType_com_sun_star_uno_Sequence_Char = NULL; if (! s_pType_com_sun_star_uno_Sequence_Char) { const ::com::sun::star::uno::Type & rElementType = cppu::UnoType<cppu::UnoCharType>::get(); diff --git a/include/com/sun/star/uno/Type.hxx b/include/com/sun/star/uno/Type.hxx index 6b22224c4e4a..0d88928fe445 100644 --- a/include/com/sun/star/uno/Type.hxx +++ b/include/com/sun/star/uno/Type.hxx @@ -40,13 +40,13 @@ inline Type::Type() } inline Type::Type( TypeClass eTypeClass, const ::rtl::OUString & rTypeName ) - : _pType( 0 ) + : _pType( NULL ) { ::typelib_typedescriptionreference_new( &_pType, (typelib_TypeClass)eTypeClass, rTypeName.pData ); } inline Type::Type( TypeClass eTypeClass, const sal_Char * pTypeName ) - : _pType( 0 ) + : _pType( NULL ) { ::typelib_typedescriptionreference_newByAsciiName( &_pType, (typelib_TypeClass)eTypeClass, pTypeName ); } @@ -86,7 +86,7 @@ inline Type & Type::operator = ( const Type & rType ) template< class T > -typelib_TypeDescriptionReference * Array< T >::s_pType = 0; +typelib_TypeDescriptionReference * Array< T >::s_pType = NULL; } } diff --git a/include/com/sun/star/uno/genfunc.hxx b/include/com/sun/star/uno/genfunc.hxx index a33de80b2c43..9583375c6aed 100644 --- a/include/com/sun/star/uno/genfunc.hxx +++ b/include/com/sun/star/uno/genfunc.hxx @@ -55,7 +55,7 @@ inline void * SAL_CALL cpp_queryInterface( void * pCppI, typelib_TypeDescription if (typelib_TypeClass_INTERFACE == aRet.pType->eTypeClass) { XInterface * pRet = static_cast< XInterface * >( aRet.pReserved ); - aRet.pReserved = 0; + aRet.pReserved = NULL; return pRet; } } @@ -63,7 +63,7 @@ inline void * SAL_CALL cpp_queryInterface( void * pCppI, typelib_TypeDescription { } } - return 0; + return NULL; } } |