diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-01-12 20:25:38 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-01-12 20:25:38 +0100 |
commit | 029149e9b7aa8ad66dca2972e26385c831153c80 (patch) | |
tree | fd5cc80e4372eecd4e9d68b636a39ef406cd286c /desktop/source/deployment/dp_persmap.cxx | |
parent | 6e8765b161a1c839fd303eecbd4ddd56f85b86ac (diff) |
More loplugin:cstylecast: desktop
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: I492363d79e443221b139f0c192a552cc5548ee4f
Diffstat (limited to 'desktop/source/deployment/dp_persmap.cxx')
-rw-r--r-- | desktop/source/deployment/dp_persmap.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/desktop/source/deployment/dp_persmap.cxx b/desktop/source/deployment/dp_persmap.cxx index ac45ea30142d..e254d9b67c0a 100644 --- a/desktop/source/deployment/dp_persmap.cxx +++ b/desktop/source/deployment/dp_persmap.cxx @@ -70,7 +70,7 @@ static OString encodeString( const OString& rStr) // short circuit for the simple non-encoded case while( --i >= 0) { - const unsigned char c = (unsigned char) *(pChar++); + const unsigned char c = static_cast<unsigned char>(*(pChar++)); if( c <= 0x0F ) break; if( c == '%') @@ -84,7 +84,7 @@ static OString encodeString( const OString& rStr) aEncStr.append( pChar - (nLen-i), nLen - i); while( --i >= 0) { - unsigned char c = (unsigned char) *(pChar++); + unsigned char c = static_cast<unsigned char>(*(pChar++)); if( c <= 0x0F ) { aEncStr.append( '%'); @@ -173,7 +173,7 @@ void PersistentMap::readAll() if( nBytesRead != sizeof(aHeaderBytes)) return; // check header magic - for( int i = 0; i < (int)sizeof(PmapMagic); ++i) + for( int i = 0; i < int(sizeof(PmapMagic)); ++i) if( aHeaderBytes[i] != PmapMagic[i]) return; @@ -237,13 +237,13 @@ void PersistentMap::flush() const OString aKeyString = encodeString( (*it).first); const sal_Int32 nKeyLen = aKeyString.getLength(); m_MapFile.write( aKeyString.getStr(), nKeyLen, nBytesWritten); - OSL_ASSERT( nKeyLen == (sal_Int32)nBytesWritten); + OSL_ASSERT( nKeyLen == static_cast<sal_Int32>(nBytesWritten)); m_MapFile.write( "\n", 1, nBytesWritten); // write line for value const OString& rValString = encodeString( (*it).second); const sal_Int32 nValLen = rValString.getLength(); m_MapFile.write( rValString.getStr(), nValLen, nBytesWritten); - OSL_ASSERT( nValLen == (sal_Int32)nBytesWritten); + OSL_ASSERT( nValLen == static_cast<sal_Int32>(nBytesWritten)); m_MapFile.write( "\n", 1, nBytesWritten); } |