summaryrefslogtreecommitdiff
path: root/lotuswordpro
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 /lotuswordpro
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 'lotuswordpro')
-rw-r--r--lotuswordpro/source/filter/explode.cxx2
-rw-r--r--lotuswordpro/source/filter/lwptable.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/lotuswordpro/source/filter/explode.cxx b/lotuswordpro/source/filter/explode.cxx
index 1cc895ec6c8a..fa04eac514d2 100644
--- a/lotuswordpro/source/filter/explode.cxx
+++ b/lotuswordpro/source/filter/explode.cxx
@@ -311,7 +311,7 @@ sal_Int32 Decompression::explode()
// point back to copy position and read bytes
m_pOutStream->SeekRel(-static_cast<long>(distance));
sal_uInt8 sTemp[MAXWIN];
- sal_uInt32 nRead = distance > Length? Length:distance;
+ sal_uInt32 nRead = std::min(distance, Length);
m_pOutStream->ReadBytes(sTemp, nRead);
if (nRead != Length)
{
diff --git a/lotuswordpro/source/filter/lwptable.cxx b/lotuswordpro/source/filter/lwptable.cxx
index d6c1cb17cd43..63ecd92b6e52 100644
--- a/lotuswordpro/source/filter/lwptable.cxx
+++ b/lotuswordpro/source/filter/lwptable.cxx
@@ -205,7 +205,7 @@ void LwpGlossary::Read()
{
if (NumIndexRows)
{
- sal_uInt16 EntriesRead = (FiledEntries > NumIndexRows)? NumIndexRows:FiledEntries;
+ sal_uInt16 EntriesRead = std::min(FiledEntries, NumIndexRows);
for (sal_uInt16 EntryCount = 1; EntryCount <= EntriesRead; EntryCount++)
m_pObjStrm->QuickReaduInt16();