From 7d8e94444d989d0ac4a4055b207726708e9ec0da Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 11 Jan 2018 08:47:15 +0200 Subject: convert ab?b:a Reviewed-on: https://gerrit.libreoffice.org/47736 Tested-by: Jenkins Reviewed-by: Noel Grandin --- oox/source/crypto/AgileEngine.cxx | 2 +- oox/source/ole/vbaexport.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'oox') diff --git a/oox/source/crypto/AgileEngine.cxx b/oox/source/crypto/AgileEngine.cxx index ef1440f5c96e..b8a791848a49 100644 --- a/oox/source/crypto/AgileEngine.cxx +++ b/oox/source/crypto/AgileEngine.cxx @@ -179,7 +179,7 @@ bool AgileEngine::decrypt(BinaryXInputStream& aInputStream, Decrypt aDecryptor(mKey, iv, AgileEngine::cryptoType(mInfo)); outputLength = aDecryptor.update(outputBuffer, inputBuffer, inputLength); - sal_uInt32 writeLength = outputLength > remaining ? remaining : outputLength; + sal_uInt32 writeLength = std::min(outputLength, remaining); aOutputStream.writeMemory(outputBuffer.data(), writeLength); remaining -= outputLength; diff --git a/oox/source/ole/vbaexport.cxx b/oox/source/ole/vbaexport.cxx index 658f072497aa..b5a45b31c1ca 100644 --- a/oox/source/ole/vbaexport.cxx +++ b/oox/source/ole/vbaexport.cxx @@ -359,7 +359,7 @@ void VBACompression::write() std::size_t nRemainingSize = nSize; while(bStreamNotEnded) { - std::size_t nChunkSize = nRemainingSize > 4096 ? 4096 : nRemainingSize; + std::size_t nChunkSize = std::min(nRemainingSize, 4096); VBACompressionChunk aChunk(mrCompressedStream, &pData[nSize - nRemainingSize], nChunkSize); aChunk.write(); -- cgit