diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-01-12 20:26:29 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-01-12 20:26:29 +0100 |
commit | 71a6caf49b1805a5a9ff29fe8f928a4551aa616b (patch) | |
tree | dd2c8bf96c26d537ffedb32c5bc5f913192234d6 /cppuhelper | |
parent | f6e256c4825a6d7c9d7125a4100c10f8c4de750a (diff) |
More loplugin:cstylecast: cppuhelper
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable
loplugin:cstylecast for some more cases" plus
solenv/clang-format/reformat-formatted-files
Change-Id: I3966d302241a52014aaad41f72924a2095ea6621
Diffstat (limited to 'cppuhelper')
-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 |
3 files changed, 5 insertions, 5 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 ) { |