opencl/source/opencl_device.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 4fccc4376cd253648bf0dd1d49dd80bc76148f08
Author: Noel Grandin <n...@peralex.com>
Date:   Wed Jan 27 11:06:31 2016 +0200

    loplugin:fpcomparison in opencl/
    
    Change-Id: Ia5b4a5010afd72ce59629dbc9b2045177a155182
    Reviewed-on: https://gerrit.libreoffice.org/21867
    Reviewed-by: Noel Grandin <noelgran...@gmail.com>
    Tested-by: Noel Grandin <noelgran...@gmail.com>

diff --git a/opencl/source/opencl_device.cxx b/opencl/source/opencl_device.cxx
index 9a10d36..32a94df 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);
 }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to