diff options
-rw-r--r-- | cppu/source/helper/purpenv/helper_purpenv_Mapping.cxx | 2 | ||||
-rw-r--r-- | cppu/source/threadpool/threadpool.cxx | 4 | ||||
-rw-r--r-- | cppu/source/typelib/typelib.cxx | 6 | ||||
-rw-r--r-- | cppu/source/uno/lbenv.cxx | 4 | ||||
-rw-r--r-- | include/com/sun/star/uno/Any.hxx | 50 | ||||
-rw-r--r-- | include/com/sun/star/uno/Sequence.hxx | 18 | ||||
-rw-r--r-- | include/cppu/Map.hxx | 4 |
7 files changed, 44 insertions, 44 deletions
diff --git a/cppu/source/helper/purpenv/helper_purpenv_Mapping.cxx b/cppu/source/helper/purpenv/helper_purpenv_Mapping.cxx index 250ad9dede94..20c121b8d037 100644 --- a/cppu/source/helper/purpenv/helper_purpenv_Mapping.cxx +++ b/cppu/source/helper/purpenv/helper_purpenv_Mapping.cxx @@ -132,7 +132,7 @@ Mapping::Mapping(uno_Environment * pFrom, uno_Mapping::acquire = s_acquire; uno_Mapping::release = s_release; - uno_Mapping::mapInterface = (uno_MapInterfaceFunc)s_mapInterface; + uno_Mapping::mapInterface = s_mapInterface; } Mapping::~Mapping() diff --git a/cppu/source/threadpool/threadpool.cxx b/cppu/source/threadpool/threadpool.cxx index 5cfb7e63e8b1..965afcec3527 100644 --- a/cppu/source/threadpool/threadpool.cxx +++ b/cppu/source/threadpool/threadpool.cxx @@ -265,7 +265,7 @@ namespace cppu_threadpool if( ii == m_mapQueue.end() ) { - m_mapQueue[ aThreadId ] = pair < JobQueue * , JobQueue * > ( (JobQueue *)0 , (JobQueue*)0 ); + m_mapQueue[ aThreadId ] = pair < JobQueue * , JobQueue * > ( nullptr , nullptr ); ii = m_mapQueue.find( aThreadId ); OSL_ASSERT( ii != m_mapQueue.end() ); } @@ -308,7 +308,7 @@ namespace cppu_threadpool if( ii == m_mapQueue.end() ) { JobQueue *p = new JobQueue(); - m_mapQueue[ aThreadId ] = pair< JobQueue * , JobQueue * > ( p , (JobQueue*)0 ); + m_mapQueue[ aThreadId ] = pair< JobQueue * , JobQueue * > ( p , nullptr ); } else if( 0 == (*ii).second.first ) { diff --git a/cppu/source/typelib/typelib.cxx b/cppu/source/typelib/typelib.cxx index 01f467cf3124..ff76c8c98be1 100644 --- a/cppu/source/typelib/typelib.cxx +++ b/cppu/source/typelib/typelib.cxx @@ -1424,7 +1424,7 @@ extern "C" void SAL_CALL typelib_typedescription_release( { MutexGuard aGuard( rInit.getMutex() ); WeakMap_Impl::iterator aIt = rInit.pWeakMap->find( pTD->pTypeName->buffer ); - if( aIt != rInit.pWeakMap->end() && (void *)(*aIt).second == (void *)pTD ) + if( aIt != rInit.pWeakMap->end() && static_cast<void *>((*aIt).second) == static_cast<void *>(pTD) ) { // remove only if it contains the same object rInit.pWeakMap->erase( aIt ); @@ -1513,7 +1513,7 @@ extern "C" void SAL_CALL typelib_typedescription_register( } // !reallyWeak - if (((void *)pTDR != (void *)*ppNewDescription) && // if different + if ((static_cast<void *>(pTDR) != static_cast<void *>(*ppNewDescription)) && // if different (!pTDR->pType->pWeakRef || // uninit: ref data only set // new one is complete: (!pTDR->pType->bComplete && (*ppNewDescription)->bComplete) || @@ -1585,7 +1585,7 @@ extern "C" void SAL_CALL typelib_typedescription_register( // description is the weak itself, so register it (*rInit.pWeakMap)[pTDR->pTypeName->buffer] = pTDR; - OSL_ASSERT( (void *)*ppNewDescription == (void *)pTDR ); + OSL_ASSERT( static_cast<void *>(*ppNewDescription) == static_cast<void *>(pTDR) ); } // By default this reference is not really weak. The reference hold the description diff --git a/cppu/source/uno/lbenv.cxx b/cppu/source/uno/lbenv.cxx index cc7a02e3364a..8068e12c38de 100644 --- a/cppu/source/uno/lbenv.cxx +++ b/cppu/source/uno/lbenv.cxx @@ -244,7 +244,7 @@ static void SAL_CALL defenv_registerInterface( // try to insert dummy 0: std::pair<OId2ObjectMap::iterator, bool> const insertion( - that->aOId2ObjectMap.insert( OId2ObjectMap::value_type( rOId, (ObjectEntry*)0 ) ) ); + that->aOId2ObjectMap.insert( OId2ObjectMap::value_type( rOId, nullptr ) ) ); if (insertion.second) { ObjectEntry * pOEntry = new ObjectEntry( rOId ); @@ -292,7 +292,7 @@ static void SAL_CALL defenv_registerProxyInterface( // try to insert dummy 0: std::pair<OId2ObjectMap::iterator, bool> const insertion( - that->aOId2ObjectMap.insert( OId2ObjectMap::value_type( rOId, (ObjectEntry*)0 ) ) ); + that->aOId2ObjectMap.insert( OId2ObjectMap::value_type( rOId, nullptr ) ) ); if (insertion.second) { ObjectEntry * pOEntry = new ObjectEntry( rOId ); diff --git a/include/com/sun/star/uno/Any.hxx b/include/com/sun/star/uno/Any.hxx index f4b4db91b806..09d3a148c5ff 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, (uno_AcquireFunc)cpp_acquire ); + ::uno_any_construct( this, 0, 0, cpp_acquire ); } @@ -61,7 +61,7 @@ inline Any::Any( T const & value ) ::uno_type_any_construct( this, const_cast<T *>(&value), ::cppu::getTypeFavourUnsigned(&value).getTypeLibType(), - (uno_AcquireFunc) cpp_acquire ); + cpp_acquire ); } inline Any::Any( bool value ) @@ -69,38 +69,38 @@ inline Any::Any( bool value ) sal_Bool b = value; ::uno_type_any_construct( this, &b, cppu::UnoType<bool>::get().getTypeLibType(), - (uno_AcquireFunc) cpp_acquire ); + cpp_acquire ); } inline Any::Any( const Any & rAny ) { - ::uno_type_any_construct( this, rAny.pData, rAny.pType, (uno_AcquireFunc)cpp_acquire ); + ::uno_type_any_construct( this, rAny.pData, rAny.pType, cpp_acquire ); } inline Any::Any( const void * pData_, const Type & rType ) { ::uno_type_any_construct( this, const_cast< void * >( pData_ ), rType.getTypeLibType(), - (uno_AcquireFunc)cpp_acquire ); + cpp_acquire ); } inline Any::Any( const void * pData_, typelib_TypeDescription * pTypeDescr ) { ::uno_any_construct( - this, const_cast< void * >( pData_ ), pTypeDescr, (uno_AcquireFunc)cpp_acquire ); + this, const_cast< void * >( pData_ ), pTypeDescr, cpp_acquire ); } inline Any::Any( const void * pData_, typelib_TypeDescriptionReference * pType_ ) { ::uno_type_any_construct( - this, const_cast< void * >( pData_ ), pType_, (uno_AcquireFunc)cpp_acquire ); + this, const_cast< void * >( pData_ ), pType_, cpp_acquire ); } inline Any::~Any() { ::uno_any_destruct( - this, (uno_ReleaseFunc)cpp_release ); + this, cpp_release ); } inline Any & Any::operator = ( const Any & rAny ) @@ -109,7 +109,7 @@ inline Any & Any::operator = ( const Any & rAny ) { ::uno_type_any_assign( this, rAny.pData, rAny.pType, - (uno_AcquireFunc)cpp_acquire, (uno_ReleaseFunc)cpp_release ); + cpp_acquire, cpp_release ); } return *this; } @@ -123,34 +123,34 @@ inline void Any::setValue( const void * pData_, const Type & rType ) { ::uno_type_any_assign( this, const_cast< void * >( pData_ ), rType.getTypeLibType(), - (uno_AcquireFunc)cpp_acquire, (uno_ReleaseFunc)cpp_release ); + cpp_acquire, cpp_release ); } inline void Any::setValue( const void * pData_, typelib_TypeDescriptionReference * pType_ ) { ::uno_type_any_assign( this, const_cast< void * >( pData_ ), pType_, - (uno_AcquireFunc)cpp_acquire, (uno_ReleaseFunc)cpp_release ); + cpp_acquire, cpp_release ); } inline void Any::setValue( const void * pData_, typelib_TypeDescription * pTypeDescr ) { ::uno_any_assign( this, const_cast< void * >( pData_ ), pTypeDescr, - (uno_AcquireFunc)cpp_acquire, (uno_ReleaseFunc)cpp_release ); + cpp_acquire, cpp_release ); } inline void Any::clear() { ::uno_any_clear( - this, (uno_ReleaseFunc)cpp_release ); + this, cpp_release ); } inline bool Any::isExtractableTo( const Type & rType ) const { return ::uno_type_isAssignableFromData( rType.getTypeLibType(), pData, pType, - (uno_QueryInterfaceFunc)cpp_queryInterface, (uno_ReleaseFunc)cpp_release ); + cpp_queryInterface, cpp_release ); } @@ -160,22 +160,22 @@ inline bool Any::has() const Type const & rType = ::cppu::getTypeFavourUnsigned(static_cast< T * >(0)); return ::uno_type_isAssignableFromData( rType.getTypeLibType(), pData, pType, - (uno_QueryInterfaceFunc) cpp_queryInterface, - (uno_ReleaseFunc) cpp_release ); + cpp_queryInterface, + cpp_release ); } inline bool Any::operator == ( const Any & rAny ) const { return ::uno_type_equalData( pData, pType, rAny.pData, rAny.pType, - (uno_QueryInterfaceFunc)cpp_queryInterface, (uno_ReleaseFunc)cpp_release ); + cpp_queryInterface, cpp_release ); } inline bool Any::operator != ( const Any & rAny ) const { return (! ::uno_type_equalData( pData, pType, rAny.pData, rAny.pType, - (uno_QueryInterfaceFunc)cpp_queryInterface, (uno_ReleaseFunc)cpp_release )); + cpp_queryInterface, cpp_release )); } @@ -214,7 +214,7 @@ inline void SAL_CALL operator <<= ( Any & rAny, const C & value ) const Type & rType = ::cppu::getTypeFavourUnsigned(&value); ::uno_type_any_assign( &rAny, const_cast< C * >( &value ), rType.getTypeLibType(), - (uno_AcquireFunc)cpp_acquire, (uno_ReleaseFunc)cpp_release ); + cpp_acquire, cpp_release ); } // additionally for C++ bool: @@ -225,7 +225,7 @@ inline void SAL_CALL operator <<= ( Any & rAny, bool const & value ) sal_Bool b = value; ::uno_type_any_assign( &rAny, &b, cppu::UnoType<bool>::get().getTypeLibType(), - (uno_AcquireFunc) cpp_acquire, (uno_ReleaseFunc) cpp_release ); + cpp_acquire, cpp_release ); } @@ -237,7 +237,7 @@ inline void SAL_CALL operator <<= ( Any & rAny, const rtl::OUStringConcat< C1, C const Type & rType = ::cppu::getTypeFavourUnsigned(&str); ::uno_type_any_assign( &rAny, const_cast< rtl::OUString * >( &str ), rType.getTypeLibType(), - (uno_AcquireFunc)cpp_acquire, (uno_ReleaseFunc)cpp_release ); + cpp_acquire, cpp_release ); } #endif @@ -248,8 +248,8 @@ inline bool SAL_CALL operator >>= ( const Any & rAny, C & value ) return ::uno_type_assignData( &value, rType.getTypeLibType(), rAny.pData, rAny.pType, - (uno_QueryInterfaceFunc)cpp_queryInterface, - (uno_AcquireFunc)cpp_acquire, (uno_ReleaseFunc)cpp_release ); + cpp_queryInterface, + cpp_acquire, cpp_release ); } // bool @@ -550,7 +550,7 @@ inline bool SAL_CALL operator >>= ( const Any & rAny, Any & value ) { ::uno_type_any_assign( &value, rAny.pData, rAny.pType, - (uno_AcquireFunc)cpp_acquire, (uno_ReleaseFunc)cpp_release ); + cpp_acquire, cpp_release ); } return true; } @@ -575,7 +575,7 @@ inline bool SAL_CALL operator == ( const Any & rAny, const C & value ) return ::uno_type_equalData( rAny.pData, rAny.pType, const_cast< C * >( &value ), rType.getTypeLibType(), - (uno_QueryInterfaceFunc)cpp_queryInterface, (uno_ReleaseFunc)cpp_release ); + cpp_queryInterface, cpp_release ); } // operator to compare to an any. may use specialized operators ==. diff --git a/include/com/sun/star/uno/Sequence.hxx b/include/com/sun/star/uno/Sequence.hxx index aab21b75c74a..b23283e1d896 100644 --- a/include/com/sun/star/uno/Sequence.hxx +++ b/include/com/sun/star/uno/Sequence.hxx @@ -50,7 +50,7 @@ inline Sequence< E >::Sequence() const Type & rType = ::cppu::getTypeFavourUnsigned( this ); ::uno_type_sequence_construct( &_pSequence, rType.getTypeLibType(), - 0, 0, (uno_AcquireFunc)cpp_acquire ); + 0, 0, cpp_acquire ); // no bad_alloc, because empty sequence is statically allocated in cppu } @@ -75,7 +75,7 @@ inline Sequence< E >::Sequence( const E * pElements, sal_Int32 len ) bool success = ::uno_type_sequence_construct( &_pSequence, rType.getTypeLibType(), - const_cast< E * >( pElements ), len, (uno_AcquireFunc)cpp_acquire ); + const_cast< E * >( pElements ), len, cpp_acquire ); if (! success) throw ::std::bad_alloc(); } @@ -87,7 +87,7 @@ inline Sequence< E >::Sequence( sal_Int32 len ) bool success = ::uno_type_sequence_construct( &_pSequence, rType.getTypeLibType(), - 0, len, (uno_AcquireFunc)cpp_acquire ); + 0, len, cpp_acquire ); if (! success) throw ::std::bad_alloc(); } @@ -110,7 +110,7 @@ inline Sequence< E >::~Sequence() { const Type & rType = ::cppu::getTypeFavourUnsigned( this ); uno_type_sequence_destroy( - _pSequence, rType.getTypeLibType(), (uno_ReleaseFunc)cpp_release ); + _pSequence, rType.getTypeLibType(), cpp_release ); } } @@ -119,7 +119,7 @@ inline Sequence< E > & Sequence< E >::operator = ( const Sequence< E > & rSeq ) { const Type & rType = ::cppu::getTypeFavourUnsigned( this ); ::uno_type_sequence_assign( - &_pSequence, rSeq._pSequence, rType.getTypeLibType(), (uno_ReleaseFunc)cpp_release ); + &_pSequence, rSeq._pSequence, rType.getTypeLibType(), cpp_release ); return *this; } @@ -132,8 +132,8 @@ inline bool Sequence< E >::operator == ( const Sequence< E > & rSeq ) const return ::uno_type_equalData( const_cast< Sequence< E > * >( this ), rType.getTypeLibType(), const_cast< Sequence< E > * >( &rSeq ), rType.getTypeLibType(), - (uno_QueryInterfaceFunc)cpp_queryInterface, - (uno_ReleaseFunc)cpp_release ); + cpp_queryInterface, + cpp_release ); } template< class E > @@ -149,7 +149,7 @@ inline E * Sequence< E >::getArray() bool success = ::uno_type_sequence_reference2One( &_pSequence, rType.getTypeLibType(), - (uno_AcquireFunc)cpp_acquire, (uno_ReleaseFunc)cpp_release ); + cpp_acquire, cpp_release ); if (! success) throw ::std::bad_alloc(); return reinterpret_cast< E * >( _pSequence->elements ); @@ -188,7 +188,7 @@ inline void Sequence< E >::realloc( sal_Int32 nSize ) bool success = ::uno_type_sequence_realloc( &_pSequence, rType.getTypeLibType(), nSize, - (uno_AcquireFunc)cpp_acquire, (uno_ReleaseFunc)cpp_release ); + cpp_acquire, cpp_release ); if (!success) throw ::std::bad_alloc(); } diff --git a/include/cppu/Map.hxx b/include/cppu/Map.hxx index 20b5f2607b88..f38aabb60278 100644 --- a/include/cppu/Map.hxx +++ b/include/cppu/Map.hxx @@ -71,7 +71,7 @@ namespace cppu { css::uno::Mapping curr2outer(css::uno::Environment::getCurrent(), outerEnv); - uno_any_destruct(res, (uno_ReleaseFunc)css::uno::cpp_release); + uno_any_destruct(res, css::uno::cpp_release); uno_type_any_constructAndConvert( res, const_cast<void *>(any.getValue()), @@ -91,7 +91,7 @@ namespace cppu { css::uno::Mapping outer2curr(outerEnv, css::uno::Environment::getCurrent()); - uno_any_destruct(res, (uno_ReleaseFunc)css::uno::cpp_release); + uno_any_destruct(res, css::uno::cpp_release); uno_type_any_constructAndConvert( res, const_cast<void *>(any.getValue()), |