diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-08 17:01:49 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-11 07:35:43 +0100 |
commit | f14b9d30293f180500fc56d81e5390021758e7c1 (patch) | |
tree | a6cd0b853169203cfa0953230e6774e7b1dd81b4 /scaddins | |
parent | d11120b95ee27cb4b05db466ed07f7a996dda125 (diff) |
convert (a>b?a:b) to std::max(a,b)
with something like:
git grep -nP '(.*)\s*>\s*(.*)\s*\?\s*\g1\s*:\s*\g2'
Change-Id: I60b9a3a2a09162bc0de4c13fdde2c209696e5413
Reviewed-on: https://gerrit.libreoffice.org/47602
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'scaddins')
-rw-r--r-- | scaddins/source/analysis/analysishelper.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scaddins/source/analysis/analysishelper.cxx b/scaddins/source/analysis/analysishelper.cxx index c66eb30afe9b..ee54dac9172a 100644 --- a/scaddins/source/analysis/analysishelper.cxx +++ b/scaddins/source/analysis/analysishelper.cxx @@ -2732,7 +2732,7 @@ sal_Int32 ScaDate::getDiff( const ScaDate& rFrom, const ScaDate& rTo ) } // finally add remaining days in this month nDiff += aTo.nDay - aFrom.nDay; - return nDiff > 0 ? nDiff : 0; + return std::max<sal_Int32>(nDiff, 0); } bool ScaDate::operator<( const ScaDate& rCmp ) const |