summaryrefslogtreecommitdiff
path: root/opencl/source/opencl_device.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-01-27 11:06:31 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-02-04 06:28:52 +0000
commit4fccc4376cd253648bf0dd1d49dd80bc76148f08 (patch)
treefa4973349e00ce03a4c992312b7b7f74f241c4ec /opencl/source/opencl_device.cxx
parent777ad8f5d5b140af0b6959995b8838bf50a578ec (diff)
loplugin:fpcomparison in opencl/
Change-Id: Ia5b4a5010afd72ce59629dbc9b2045177a155182 Reviewed-on: https://gerrit.libreoffice.org/21867 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'opencl/source/opencl_device.cxx')
-rw-r--r--opencl/source/opencl_device.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/opencl/source/opencl_device.cxx b/opencl/source/opencl_device.cxx
index 9a10d3651d1d..32a94df5dcb3 100644
--- a/opencl/source/opencl_device.cxx
+++ b/opencl/source/opencl_device.cxx
@@ -29,6 +29,7 @@
#include <opencl/openclwrapper.hxx>
#include <opencl/platforminfo.hxx>
#include <sal/log.hxx>
+#include <rtl/math.hxx>
#include "opencl_device.hxx"
@@ -175,7 +176,7 @@ double timerCurrent(timer* mytimer)
/* Random number generator */
double random(double min, double max)
{
- if (min == max)
+ if (rtl::math::approxEqual(min, max))
return min;
return comphelper::rng::uniform_real_distribution(min, max);
}