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 /svl | |
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 'svl')
-rw-r--r-- | svl/source/crypto/cryptosign.cxx | 6 | ||||
-rw-r--r-- | svl/source/svdde/ddecli.cxx | 12 | ||||
-rw-r--r-- | svl/source/svdde/ddesvr.cxx | 10 |
3 files changed, 14 insertions, 14 deletions
diff --git a/svl/source/crypto/cryptosign.cxx b/svl/source/crypto/cryptosign.cxx index e4c9337c2a6a..429468b6e9fa 100644 --- a/svl/source/crypto/cryptosign.cxx +++ b/svl/source/crypto/cryptosign.cxx @@ -2349,15 +2349,15 @@ bool Signing::Verify(const std::vector<unsigned char>& aData, if (rInformation.ouDateTime.isEmpty()) { OUStringBuffer rBuffer; - rBuffer.append((sal_Int32)aDateTime.GetYear()); + rBuffer.append(static_cast<sal_Int32>(aDateTime.GetYear())); rBuffer.append('-'); if (aDateTime.GetMonth() < 10) rBuffer.append('0'); - rBuffer.append((sal_Int32)aDateTime.GetMonth()); + rBuffer.append(static_cast<sal_Int32>(aDateTime.GetMonth())); rBuffer.append('-'); if (aDateTime.GetDay() < 10) rBuffer.append('0'); - rBuffer.append((sal_Int32)aDateTime.GetDay()); + rBuffer.append(static_cast<sal_Int32>(aDateTime.GetDay())); rInformation.ouDateTime = rBuffer.makeStringAndClear(); } break; diff --git a/svl/source/svdde/ddecli.cxx b/svl/source/svdde/ddecli.cxx index c84bb92592de..3faef58aca80 100644 --- a/svl/source/svdde/ddecli.cxx +++ b/svl/source/svdde/ddecli.cxx @@ -84,7 +84,7 @@ HDDEDATA CALLBACK DdeInternal::CliCallback( UINT nCode, UINT nCbType, switch( nCode ) { case XTYP_XACT_COMPLETE: - if( (DWORD)(*iter)->nId == nInfo1 ) + if( static_cast<DWORD>((*iter)->nId) == nInfo1 ) { nCode = (*iter)->nType & (XCLASS_MASK | XTYP_MASK); (*iter)->bBusy = false; @@ -270,7 +270,7 @@ void DdeTransaction::Execute() { HSZ hItem = pName->getHSZ(); void const * pData = aDdeData.getData(); - DWORD nData = (DWORD)aDdeData.getSize(); + DWORD nData = static_cast<DWORD>(aDdeData.getSize()); SotClipboardFormatId nIntFmt = aDdeData.xImp->nFmt; UINT nExtFmt = DdeData::GetExternalFormat( nIntFmt ); DdeInstData* pInst = ImpGetInstData(); @@ -286,8 +286,8 @@ void DdeTransaction::Execute() { HDDEDATA hData = DdeClientTransaction( static_cast<LPBYTE>(const_cast<void *>(pData)), nData, rDde.pImp->hConv, - hItem, nExtFmt, (UINT)nType, - (DWORD)nTime, nullptr ); + hItem, nExtFmt, static_cast<UINT>(nType), + static_cast<DWORD>(nTime), nullptr ); rDde.pImp->nStatus = DdeGetLastError( pInst->hDdeInstCli ); if( hData && nType == XTYP_REQUEST ) @@ -311,7 +311,7 @@ void DdeTransaction::Execute() DWORD result; HDDEDATA hRet = DdeClientTransaction( static_cast<LPBYTE>(const_cast<void *>(pData)), nData, rDde.pImp->hConv, hItem, nExtFmt, - (UINT)nType, TIMEOUT_ASYNC, + static_cast<UINT>(nType), TIMEOUT_ASYNC, &result ); nId = result; rDde.pImp->nStatus = hRet ? DMLERR_NO_ERROR @@ -349,7 +349,7 @@ DdeLink::DdeLink( DdeConnection& d, const OUString& aItemName, long n ) DdeLink::~DdeLink() { - nType = (sal_uInt16)XTYP_ADVSTOP; + nType = sal_uInt16(XTYP_ADVSTOP); nTime = 0; } diff --git a/svl/source/svdde/ddesvr.cxx b/svl/source/svdde/ddesvr.cxx index 45098bec4764..e79f26063237 100644 --- a/svl/source/svdde/ddesvr.cxx +++ b/svl/source/svdde/ddesvr.cxx @@ -530,14 +530,14 @@ bool DdeService::HasCbFormat( sal_uInt16 nFmt ) bool DdeService::HasFormat(SotClipboardFormatId nFmt) { - return HasCbFormat( (sal_uInt16)DdeData::GetExternalFormat( nFmt )); + return HasCbFormat( static_cast<sal_uInt16>(DdeData::GetExternalFormat( nFmt ))); } void DdeService::AddFormat(SotClipboardFormatId nFmt) { sal_uLong nExternalFmt = DdeData::GetExternalFormat( nFmt ); for ( size_t i = 0, n = aFormats.size(); i < n; ++i ) - if ( (sal_uLong) aFormats[ i ] == nExternalFmt ) + if ( static_cast<sal_uLong>(aFormats[ i ]) == nExternalFmt ) return; aFormats.push_back( nExternalFmt ); } @@ -547,7 +547,7 @@ void DdeService::RemoveFormat(SotClipboardFormatId nFmt) sal_uLong nExternalFmt = DdeData::GetExternalFormat( nFmt ); for ( DdeFormats::iterator it = aFormats.begin(); it != aFormats.end(); ++it ) { - if ( (sal_uLong) *it == nExternalFmt ) + if ( static_cast<sal_uLong>(*it) == nExternalFmt ) { aFormats.erase( it ); break; @@ -876,7 +876,7 @@ OUString DdeService::Formats() if ( n ) s += "\t"; - switch( (sal_uInt16)f ) + switch( static_cast<sal_uInt16>(f) ) { case CF_TEXT: s += "TEXT"; @@ -887,7 +887,7 @@ OUString DdeService::Formats() default: { WCHAR buf[128]; - GetClipboardFormatNameW( (UINT)f, buf, SAL_N_ELEMENTS(buf) ); + GetClipboardFormatNameW( static_cast<UINT>(f), buf, SAL_N_ELEMENTS(buf) ); s += o3tl::toU(buf); } break; |