diff options
-rw-r--r-- | cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx | 4 | ||||
-rw-r--r-- | cppuhelper/source/interfacecontainer.cxx | 4 | ||||
-rw-r--r-- | cppuhelper/source/propshlp.cxx | 2 | ||||
-rw-r--r-- | include/cppuhelper/interfacecontainer.h | 2 | ||||
-rw-r--r-- | include/cppuhelper/proptypehlp.hxx | 16 |
5 files changed, 14 insertions, 14 deletions
diff --git a/cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx b/cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx index 9110cc680476..2a4bc64ab703 100644 --- a/cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx +++ b/cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx @@ -115,8 +115,8 @@ namespace cppu_ifcontainer aElements = pContainer->getElements(); CPPUNIT_ASSERT_MESSAGE("query contents", - bool((int)aElements.getLength() == nTests)); - if ((int)aElements.getLength() == nTests) + bool(static_cast<int>(aElements.getLength()) == nTests)); + if (static_cast<int>(aElements.getLength()) == nTests) { for (i = 0; i < nTests; i++) { diff --git a/cppuhelper/source/interfacecontainer.cxx b/cppuhelper/source/interfacecontainer.cxx index 75ae965bf813..d4d60b634d99 100644 --- a/cppuhelper/source/interfacecontainer.cxx +++ b/cppuhelper/source/interfacecontainer.cxx @@ -373,7 +373,7 @@ Sequence< Type > OMultiTypeInterfaceContainerHelper::getContainedTypes() const pArray[i++] = (*iter).first; ++iter; } - if( (t_type2ptr::size_type)i != nSize ) { + if( static_cast<t_type2ptr::size_type>(i) != nSize ) { // may be empty container, reduce the sequence to the right size aInterfaceTypes = css::uno::Sequence< Type >( pArray, i ); } @@ -554,7 +554,7 @@ Sequence< sal_Int32 > OMultiTypeInterfaceContainerHelperInt32::getContainedTypes pArray[i++] = (*iter).first; ++iter; } - if( (t_long2ptr::size_type)i != nSize ) { + if( static_cast<t_long2ptr::size_type>(i) != nSize ) { // may be empty container, reduce the sequence to the right size aInterfaceTypes = css::uno::Sequence< sal_Int32 >( pArray, i ); } diff --git a/cppuhelper/source/propshlp.cxx b/cppuhelper/source/propshlp.cxx index eea33d133aaf..6d1549d68e96 100644 --- a/cppuhelper/source/propshlp.cxx +++ b/cppuhelper/source/propshlp.cxx @@ -1118,7 +1118,7 @@ sal_Int32 OPropertyArrayHelper::fillHandles( sal_Int32 * pHandles, const Sequenc for( sal_Int32 i = 0; i < nReqLen; i++ ) { // Calculate logarithm - sal_Int32 n = (sal_Int32)(pEnd - pCur); + sal_Int32 n = static_cast<sal_Int32>(pEnd - pCur); sal_Int32 nLog = 0; while( n ) { diff --git a/include/cppuhelper/interfacecontainer.h b/include/cppuhelper/interfacecontainer.h index 58298e3e9490..67e6353f4a2d 100644 --- a/include/cppuhelper/interfacecontainer.h +++ b/include/cppuhelper/interfacecontainer.h @@ -501,7 +501,7 @@ struct SAL_WARN_UNUSED OBroadcastHelperVar struct hashType_Impl { size_t operator()(const css::uno::Type & s) const - { return (size_t) s.getTypeName().hashCode(); } + { return static_cast<size_t>(s.getTypeName().hashCode()); } }; diff --git a/include/cppuhelper/proptypehlp.hxx b/include/cppuhelper/proptypehlp.hxx index d598f9d1f2aa..5ecdbc5e0411 100644 --- a/include/cppuhelper/proptypehlp.hxx +++ b/include/cppuhelper/proptypehlp.hxx @@ -88,7 +88,7 @@ inline void SAL_CALL convertPropertyValue( sal_Int64 & i , const css::uno::Any { sal_Unicode c; c = *static_cast<sal_Unicode const *>(a.getValue()); - i = ( sal_Int64 ) c; + i = static_cast<sal_Int64>(c); break; } default: @@ -109,7 +109,7 @@ inline void SAL_CALL convertPropertyValue( sal_uInt64 & i , const css::uno::Any { sal_Unicode c; c = *static_cast<sal_Unicode const *>(a.getValue()); - i = ( sal_uInt64 ) c; + i = static_cast<sal_uInt64>(c); break; } default: @@ -129,7 +129,7 @@ inline void SAL_CALL convertPropertyValue( sal_Int32 & i , const css::uno::Any { sal_Unicode c; c = *static_cast<sal_Unicode const *>(a.getValue()); - i = ( sal_Int32 ) c; + i = static_cast<sal_Int32>(c); break; } default: @@ -149,7 +149,7 @@ inline void SAL_CALL convertPropertyValue( sal_uInt32 & i , const css::uno::Any { sal_Unicode c; c = *static_cast<sal_Unicode const *>(a.getValue()); - i = ( sal_uInt32 ) c; + i = static_cast<sal_uInt32>(c); break; } default: @@ -169,7 +169,7 @@ inline void SAL_CALL convertPropertyValue( sal_Int16 & i , const css::uno::Any { sal_Unicode c; c = *static_cast<sal_Unicode const *>(a.getValue()); - i = ( sal_Int16 ) c; + i = static_cast<sal_Int16>(c); break; } default: @@ -189,7 +189,7 @@ inline void SAL_CALL convertPropertyValue( sal_uInt16 & i , const css::uno::Any { sal_Unicode c; c = *static_cast<sal_Unicode const *>(a.getValue()); - i = ( sal_Int16 ) c; + i = static_cast<sal_Int16>(c); break; } default: @@ -237,7 +237,7 @@ inline void SAL_CALL convertPropertyValue( float &f , const css::uno::Any &a ) { sal_Unicode c; c = *static_cast<sal_Unicode const *>(a.getValue()); - f = ( float ) c; + f = static_cast<float>(c); break; } default: @@ -263,7 +263,7 @@ inline void SAL_CALL convertPropertyValue( double &d , const css::uno::Any &a ) { sal_Unicode c; c = *static_cast<sal_Unicode const *>(a.getValue()); - d = (double) c; + d = static_cast<double>(c); break; } default: |