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 /opencl | |
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 'opencl')
-rw-r--r-- | opencl/source/opencl_device.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/opencl/source/opencl_device.cxx b/opencl/source/opencl_device.cxx index f803076c97b4..c4de9284c8df 100644 --- a/opencl/source/opencl_device.cxx +++ b/opencl/source/opencl_device.cxx @@ -13,6 +13,7 @@ #include <sstream> #include <memory> #include <vector> +#include <algorithm> #include <comphelper/random.hxx> #include <opencl/openclconfig.hxx> @@ -285,7 +286,7 @@ ds_status evaluateScoreForDevice(ds_device& rDevice, std::unique_ptr<LibreOffice for (unsigned long i = 0; i < testData->inputSize; i++) { fAverage += testData->input0[i]; - fMin = ((fMin < testData->input1[i]) ? fMin : testData->input1[i]); + fMin = std::min(fMin, testData->input1[i]); fSoP += testData->input2[i] * testData->input3[i]; } fAverage /= testData->inputSize; |