From f8cff53299f31c124468cf575bd08bfbf28bc578 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 4 Apr 2017 10:04:04 +0200 Subject: loplugin:redundantcast (clang-cl) Change-Id: Ie096d75c1bc774e77c589845f61276d1478234ef Reviewed-on: https://gerrit.libreoffice.org/36065 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- basic/source/sbx/sbxdec.cxx | 4 ++-- connectivity/source/drivers/ado/AConnection.cxx | 2 +- embedserv/source/embed/docholder.cxx | 2 +- extensions/source/ole/oleobjw.cxx | 2 +- tools/source/stream/strmwnt.cxx | 2 +- vcl/win/window/salframe.cxx | 2 +- winaccessibility/source/UAccCOM/AccEditableText.cxx | 4 ++-- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/basic/source/sbx/sbxdec.cxx b/basic/source/sbx/sbxdec.cxx index 70b44cb5488b..59008e796923 100644 --- a/basic/source/sbx/sbxdec.cxx +++ b/basic/source/sbx/sbxdec.cxx @@ -147,7 +147,7 @@ void SbxDecimal::setChar( sal_Unicode val ) void SbxDecimal::setByte( sal_uInt8 val ) { - VarDecFromUI1( (sal_uInt8)val, &maDec ); + VarDecFromUI1( val, &maDec ); } void SbxDecimal::setShort( sal_Int16 val ) @@ -162,7 +162,7 @@ void SbxDecimal::setLong( sal_Int32 val ) void SbxDecimal::setUShort( sal_uInt16 val ) { - VarDecFromUI2( (sal_uInt16)val, &maDec ); + VarDecFromUI2( val, &maDec ); } void SbxDecimal::setULong( sal_uInt32 val ) diff --git a/connectivity/source/drivers/ado/AConnection.cxx b/connectivity/source/drivers/ado/AConnection.cxx index 6bee25654e50..2ad0f8938cab 100644 --- a/connectivity/source/drivers/ado/AConnection.cxx +++ b/connectivity/source/drivers/ado/AConnection.cxx @@ -435,7 +435,7 @@ void OConnection::buildTypeInfo() sal_Int32 nPos = 1; OExtendedTypeInfo* aInfo = new OExtendedTypeInfo; aInfo->aSimpleType.aTypeName = ADOS::getField(pRecordset,nPos++).get_Value().getString(); - aInfo->eType = (DataTypeEnum)(sal_Int32)ADOS::getField(pRecordset,nPos++).get_Value().getInt32(); + aInfo->eType = (DataTypeEnum)ADOS::getField(pRecordset,nPos++).get_Value().getInt32(); if ( aInfo->eType == adWChar && aInfo->aSimpleType.aTypeName == s_sVarChar ) aInfo->eType = adVarWChar; aInfo->aSimpleType.nType = (sal_Int16)ADOS::MapADOType2Jdbc(static_cast(aInfo->eType)); diff --git a/embedserv/source/embed/docholder.cxx b/embedserv/source/embed/docholder.cxx index ff30b0bb7c8e..6bb68fed3891 100644 --- a/embedserv/source/embed/docholder.cxx +++ b/embedserv/source/embed/docholder.cxx @@ -517,7 +517,7 @@ void CopyToOLEMenu(HMENU hOrig,WORD origPos,HMENU hDest,WORD destPos) mi.cbSize = sizeof(mi); mi.fMask = MIIM_DATA; if(GetMenuItemInfoW(hOrig,origPos,TRUE,&mi)) - SetMenuItemInfoW(hDest,(WORD)destPos,TRUE,&mi); + SetMenuItemInfoW(hDest,destPos,TRUE,&mi); } BOOL DocumentHolder::InPlaceMenuCreate() diff --git a/extensions/source/ole/oleobjw.cxx b/extensions/source/ole/oleobjw.cxx index 32af29c6fe91..73e1d80e9515 100644 --- a/extensions/source/ole/oleobjw.cxx +++ b/extensions/source/ole/oleobjw.cxx @@ -1828,7 +1828,7 @@ Any IUnknownWrapper_Impl::invokeWithDispIdComTlb(FuncDesc& aFuncDesc, OUStringBuffer buf(256); buf.append("ole automation bridge: The called function expects an argument at" "position: "); //a different number of arguments")), - buf.append(OUString::number((sal_Int32) i)); + buf.append(OUString::number(i)); buf.append(" (index starting at 0)."); throw IllegalArgumentException( buf.makeStringAndClear(), Reference(), (sal_Int16) i); diff --git a/tools/source/stream/strmwnt.cxx b/tools/source/stream/strmwnt.cxx index 204602fff220..f222bbd7af2b 100644 --- a/tools/source/stream/strmwnt.cxx +++ b/tools/source/stream/strmwnt.cxx @@ -145,7 +145,7 @@ std::size_t SvFileStream::GetData( void* pData, std::size_t nSize ) SetError(::GetSvError( nTestError ) ); } } - return (DWORD)nCount; + return nCount; } std::size_t SvFileStream::PutData( const void* pData, std::size_t nSize ) diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx index 4932ecdabdac..b37a95161045 100644 --- a/vcl/win/window/salframe.cxx +++ b/vcl/win/window/salframe.cxx @@ -2510,7 +2510,7 @@ OUString WinSalFrame::GetKeyName( sal_uInt16 nKeyCode ) if ( nSysCode ) { - nSysCode = MapVirtualKey( (UINT)nSysCode, 0 ); + nSysCode = MapVirtualKey( nSysCode, 0 ); if ( nSysCode ) nSysCode = (nSysCode << 16) | nSysCode2; ImplGetKeyNameText( nSysCode, aKeyBuf, nKeyBufLen, nMaxKeyLen, pReplace ); diff --git a/winaccessibility/source/UAccCOM/AccEditableText.cxx b/winaccessibility/source/UAccCOM/AccEditableText.cxx index 28923b01436f..bf1fc69f6d3b 100644 --- a/winaccessibility/source/UAccCOM/AccEditableText.cxx +++ b/winaccessibility/source/UAccCOM/AccEditableText.cxx @@ -357,7 +357,7 @@ void CAccEditableText::get_AnyFromOLECHAR(const ::rtl::OUString &ouName, const : if(posComma != -1) { ouSubValue = ouValue.copy(pos + 11, posComma - pos - 11); - tabStop.DecimalChar = (sal_Unicode)ouSubValue.toChar(); + tabStop.DecimalChar = ouSubValue.toChar(); pos = posComma + 1; // FillChar. @@ -368,7 +368,7 @@ void CAccEditableText::get_AnyFromOLECHAR(const ::rtl::OUString &ouName, const : if(posComma != -1) { ouSubValue = ouValue.copy(pos + 9, posComma - pos - 9); - tabStop.DecimalChar = (sal_Unicode)ouSubValue.toChar(); + tabStop.DecimalChar = ouSubValue.toChar(); pos = posComma + 1; // Complete TabStop element. -- cgit v1.2.3