diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-11 08:47:15 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-15 07:26:17 +0100 |
commit | 7d8e94444d989d0ac4a4055b207726708e9ec0da (patch) | |
tree | ce3e4a09ed7932496c4d901360ff23787c8f6e24 /sdext | |
parent | 80fb8d406ced47e6a2089f0c8ba5c103d2fec91f (diff) |
convert a<b?a:b to std::min(a,b)
with something like
git grep -nP '(.*)\s*<\s*(.*)\s*\?\s*\g1\s*:\s*\g2' -- *.?xx
Change-Id: Id5078b35961847feb78a66204fdb7598ee63fd23
Note: we also convert a>b?b:a
Reviewed-on: https://gerrit.libreoffice.org/47736
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sdext')
-rw-r--r-- | sdext/source/pdfimport/filterdet.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sdext/source/pdfimport/filterdet.cxx b/sdext/source/pdfimport/filterdet.cxx index 5ca60e4282e5..99c0f0359fa4 100644 --- a/sdext/source/pdfimport/filterdet.cxx +++ b/sdext/source/pdfimport/filterdet.cxx @@ -443,7 +443,7 @@ bool checkDocChecksum( const OUString& rInPDFFileURL, sal_uInt64 nBytesRead = 0; while( nCur < nBytes ) { - sal_uInt32 nPass = (nBytes - nCur) > sizeof( aBuf ) ? sizeof( aBuf ) : nBytes - nCur; + sal_uInt32 nPass = std::min<sal_uInt32>(nBytes - nCur, sizeof( aBuf )); if( (aErr = osl_readFile( aRead, aBuf, nPass, &nBytesRead)) != osl_File_E_None || nBytesRead == 0 ) { |