summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-01-11 08:47:15 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-01-15 07:26:17 +0100
commit7d8e94444d989d0ac4a4055b207726708e9ec0da (patch)
treece3e4a09ed7932496c4d901360ff23787c8f6e24 /sd
parent80fb8d406ced47e6a2089f0c8ba5c103d2fec91f (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 'sd')
-rw-r--r--sd/source/filter/eppt/pptexsoundcollection.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sd/source/filter/eppt/pptexsoundcollection.cxx b/sd/source/filter/eppt/pptexsoundcollection.cxx
index 080bf0bc6203..287853b05c51 100644
--- a/sd/source/filter/eppt/pptexsoundcollection.cxx
+++ b/sd/source/filter/eppt/pptexsoundcollection.cxx
@@ -133,7 +133,7 @@ void ExSoundEntry::Write( SvStream& rSt, sal_uInt32 nId ) const
std::unique_ptr<sal_uInt8[]> pBuf( new sal_uInt8[ 0x10000 ] ); // 64 kB Buffer
while ( nBytesLeft )
{
- sal_uInt32 nToDo = ( nBytesLeft > 0x10000 ) ? 0x10000 : nBytesLeft;
+ sal_uInt32 nToDo = std::min<sal_uInt32>( nBytesLeft, 0x10000 );
pSourceFile->ReadBytes(pBuf.get(), nToDo);
rSt.WriteBytes(pBuf.get(), nToDo);
nBytesLeft -= nToDo;