summaryrefslogtreecommitdiff
path: root/svl/source/passwordcontainer
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-01-12 20:14:44 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-01-12 20:14:44 +0100
commitdead6b3a944d0100ef833bb5d7f92bcd2563ada4 (patch)
tree3353ff138015cf48c38db8abaa9bc3478271b2cd /svl/source/passwordcontainer
parent43b137e1404acbd16649813e9d493ba97b8f509c (diff)
More loplugin:cstylecast: svl
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: I71e3b2c9b4c68183288f43999d242e95ae13584d
Diffstat (limited to 'svl/source/passwordcontainer')
-rw-r--r--svl/source/passwordcontainer/passwordcontainer.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx
index 90b66090ce48..6b8401fd5093 100644
--- a/svl/source/passwordcontainer/passwordcontainer.cxx
+++ b/svl/source/passwordcontainer/passwordcontainer.cxx
@@ -150,8 +150,8 @@ static OUString getAsciiLine( const ::rtl::ByteSequence& buf )
for( int ind = 0; ind < buf.getLength(); ind++ )
{
- outbuf[ind*2] = ( ((sal_uInt8)buf[ind]) >> 4 ) + 'a';
- outbuf[ind*2+1] = ( ((sal_uInt8)buf[ind]) & 0x0f ) + 'a';
+ outbuf[ind*2] = ( static_cast<sal_uInt8>(buf[ind]) >> 4 ) + 'a';
+ outbuf[ind*2+1] = ( static_cast<sal_uInt8>(buf[ind]) & 0x0f ) + 'a';
}
outbuf[buf.getLength()*2] = '\0';
@@ -169,7 +169,7 @@ static ::rtl::ByteSequence getBufFromAsciiLine( const OUString& line )
for( int ind = 0; ind < tmpLine.getLength()/2; ind++ )
{
- aResult[ind] = ( (sal_uInt8)( tmpLine[ind*2] - 'a' ) << 4 ) | (sal_uInt8)( tmpLine[ind*2+1] - 'a' );
+ aResult[ind] = ( static_cast<sal_uInt8>( tmpLine[ind*2] - 'a' ) << 4 ) | static_cast<sal_uInt8>( tmpLine[ind*2+1] - 'a' );
}
return aResult;
@@ -430,7 +430,7 @@ std::vector< OUString > PasswordContainer::DecodePasswords( const OUString& aLin
unsigned char code[RTL_DIGEST_LENGTH_MD5];
for( int ind = 0; ind < RTL_DIGEST_LENGTH_MD5; ind++ )
- code[ ind ] = (char)(aMasterPasswd.copy( ind*2, 2 ).toUInt32(16));
+ code[ ind ] = static_cast<char>(aMasterPasswd.copy( ind*2, 2 ).toUInt32(16));
rtlCipherError result = rtl_cipher_init (
aDecoder, rtl_Cipher_DirectionDecode,
@@ -481,7 +481,7 @@ OUString PasswordContainer::EncodePasswords(const std::vector< OUString >& lines
unsigned char code[RTL_DIGEST_LENGTH_MD5];
for( int ind = 0; ind < RTL_DIGEST_LENGTH_MD5; ind++ )
- code[ ind ] = (char)(aMasterPasswd.copy( ind*2, 2 ).toUInt32(16));
+ code[ ind ] = static_cast<char>(aMasterPasswd.copy( ind*2, 2 ).toUInt32(16));
rtlCipherError result = rtl_cipher_init (
aEncoder, rtl_Cipher_DirectionEncode,