diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-01-12 20:17:51 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-01-12 20:17:51 +0100 |
commit | 5a3bb76cd384fa3760fe8481ce008791258595ad (patch) | |
tree | 8544fecc06b73cb43000143339c06ad880b56db4 /sal/textenc/tcvtutf7.cxx | |
parent | acd1696a066b8fa6fb94a0613939565799413769 (diff) |
More loplugin:cstylecast: sal
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: I7d89b011464ba5d2dd12e04d5fc9f65cb4daebde
Diffstat (limited to 'sal/textenc/tcvtutf7.cxx')
-rw-r--r-- | sal/textenc/tcvtutf7.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sal/textenc/tcvtutf7.cxx b/sal/textenc/tcvtutf7.cxx index 2b18d4370b3a..6c0625d0016e 100644 --- a/sal/textenc/tcvtutf7.cxx +++ b/sal/textenc/tcvtutf7.cxx @@ -180,7 +180,7 @@ sal_Size ImplUTF7ToUnicode( SAL_UNUSED_PARAMETER const void*, void* pContext, { if ( pSrcBuf < pEndSrcBuf ) { - c = (unsigned char)*pSrcBuf; + c = static_cast<unsigned char>(*pSrcBuf); /* End, when not a base64 character */ bBase64End = false; @@ -235,7 +235,7 @@ sal_Size ImplUTF7ToUnicode( SAL_UNUSED_PARAMETER const void*, void* pContext, /* Skip character */ pSrcBuf++; if ( pSrcBuf < pEndSrcBuf ) - c = (unsigned char)*pSrcBuf; + c = static_cast<unsigned char>(*pSrcBuf); else bEnd = true; } @@ -266,7 +266,7 @@ sal_Size ImplUTF7ToUnicode( SAL_UNUSED_PARAMETER const void*, void* pContext, { /* Add 6 Bits from character to the bit buffer */ nBufferBits += 6; - nBitBuffer |= ((sal_uInt32)(nBase64Value & 0x3F)) << (32-nBufferBits); + nBitBuffer |= static_cast<sal_uInt32>(nBase64Value & 0x3F) << (32-nBufferBits); bFirst = false; } @@ -275,7 +275,7 @@ sal_Size ImplUTF7ToUnicode( SAL_UNUSED_PARAMETER const void*, void* pContext, while ( (pDestBuf < pEndDestBuf) && (nBufferBits >= 16) ) { nBitBufferTemp = nBitBuffer >> (32-16); - *pDestBuf = (sal_Unicode)(nBitBufferTemp & 0xFFFF); + *pDestBuf = static_cast<sal_Unicode>(nBitBufferTemp & 0xFFFF); pDestBuf++; nBitBuffer <<= 16; nBufferBits -= 16; @@ -506,7 +506,7 @@ sal_Size ImplUnicodeToUTF7( SAL_UNUSED_PARAMETER const void*, void* pContext, if ( bNeedShift ) { nBufferBits += 16; - nBitBuffer |= ((sal_uInt32)c) << (32-nBufferBits); + nBitBuffer |= static_cast<sal_uInt32>(c) << (32-nBufferBits); } else nBufferBits += (6-(nBufferBits%6))%6; |