summaryrefslogtreecommitdiffstats
path: root/sc/source/core/tool/interpr3.cxx
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 /sc/source/core/tool/interpr3.cxx
parentFix typos (diff)
downloadcore-7d8e94444d989d0ac4a4055b207726708e9ec0da.tar.gz
core-7d8e94444d989d0ac4a4055b207726708e9ec0da.zip
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 'sc/source/core/tool/interpr3.cxx')
-rw-r--r--sc/source/core/tool/interpr3.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx
index 723c75d8139f..55b80a6612e9 100644
--- a/sc/source/core/tool/interpr3.cxx
+++ b/sc/source/core/tool/interpr3.cxx
@@ -1261,7 +1261,7 @@ double lcl_GetBinomDistRange(double n, double xs,double xe,
fFactor *= (n-i+1)/i * p/q;
fSum += fFactor;
}
- return (fSum>1.0) ? 1.0 : fSum;
+ return std::min(fSum,1.0);
}
void ScInterpreter::ScB()