diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-01-22 13:11:34 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-01-23 07:54:51 +0100 |
commit | 9af8f190ed1bf3f76897ad0c078db16451d6fb69 (patch) | |
tree | 015089ee72a67eca7db999845cabb8104c8ce3aa /basic/source | |
parent | 9602e63c818722c3910343b7af53917d031861c8 (diff) |
More loplugin:cstylecast on Windows
Automatic rewrite (of loplugin:cstylecast and loplugin:unnecessaryparen) after
cab0427cadddb3aaf1349c66f2fa13a4234ba4b2 "Enable loplugin:cstylecast for some
more cases" and a409d32e7f6fc09e041079d6dbc3c927497adfed "More
loplugin:cstylecast"
Change-Id: Ib3355159dd08333e1b7a8d091caf2069cdcc7862
Reviewed-on: https://gerrit.libreoffice.org/48317
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'basic/source')
-rw-r--r-- | basic/source/runtime/methods.cxx | 2 | ||||
-rw-r--r-- | basic/source/sbx/sbxdec.cxx | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 58c8b35c9cb1..5f53992360ff 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -2938,7 +2938,7 @@ void SbRtl_GetAttr(StarBASIC * pBasic, SbxArray & rPar, bool bWrite) { nRealFlags = 0; } - nFlags = (sal_Int16) nRealFlags; + nFlags = static_cast<sal_Int16>(nRealFlags); } else { diff --git a/basic/source/sbx/sbxdec.cxx b/basic/source/sbx/sbxdec.cxx index 183abf2de137..4c9be3546afd 100644 --- a/basic/source/sbx/sbxdec.cxx +++ b/basic/source/sbx/sbxdec.cxx @@ -138,13 +138,13 @@ bool SbxDecimal::isZero() SbxDecimal::CmpResult compare( const SbxDecimal &rLeft, const SbxDecimal &rRight ) { HRESULT hResult = VarDecCmp( const_cast<LPDECIMAL>(&rLeft.maDec), const_cast<LPDECIMAL>(&rRight.maDec) ); - SbxDecimal::CmpResult eRes = (SbxDecimal::CmpResult)hResult; + SbxDecimal::CmpResult eRes = static_cast<SbxDecimal::CmpResult>(hResult); return eRes; } void SbxDecimal::setChar( sal_Unicode val ) { - VarDecFromUI2( (sal_uInt16)val, &maDec ); + VarDecFromUI2( static_cast<sal_uInt16>(val), &maDec ); } void SbxDecimal::setByte( sal_uInt8 val ) @@ -154,12 +154,12 @@ void SbxDecimal::setByte( sal_uInt8 val ) void SbxDecimal::setShort( sal_Int16 val ) { - VarDecFromI2( (short)val, &maDec ); + VarDecFromI2( static_cast<short>(val), &maDec ); } void SbxDecimal::setLong( sal_Int32 val ) { - VarDecFromI4( (long)val, &maDec ); + VarDecFromI4( static_cast<long>(val), &maDec ); } void SbxDecimal::setUShort( sal_uInt16 val ) @@ -186,12 +186,12 @@ bool SbxDecimal::setDouble( double val ) void SbxDecimal::setInt( int val ) { - setLong( (sal_Int32)val ); + setLong( static_cast<sal_Int32>(val) ); } void SbxDecimal::setUInt( unsigned int val ) { - setULong( (sal_uInt32)val ); + setULong( static_cast<sal_uInt32>(val) ); } bool SbxDecimal::setString( OUString* pOUString ) |