[gimp] plug-ins: fix GIMPressionist build warning.



commit 4fe56cd388aa9428d20fc485470fc7b86d976aa4
Author: Jehan <jehan girinstud io>
Date:   Sat Oct 31 15:22:26 2020 +0100

    plug-ins: fix GIMPressionist build warning.
    
    Fixes the following warnings (×3):
    > warning: using integer absolute value function ‘abs’ when argument is
    > of floating point type ‘double’

 plug-ins/gimpressionist/repaint.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/plug-ins/gimpressionist/repaint.c b/plug-ins/gimpressionist/repaint.c
index 6a985c183e..745875696a 100644
--- a/plug-ins/gimpressionist/repaint.c
+++ b/plug-ins/gimpressionist/repaint.c
@@ -184,9 +184,9 @@ choose_best_brush (ppm_t *p, ppm_t *a, int tx, int ty,
               if ((h = brush->col[(y * brush->width * 3) + x * 3]))
                 {
                   v = h / 255.0;
-                  dev += abs (row[k+0] - r) * v;
-                  dev += abs (row[k+1] - g) * v;
-                  dev += abs (row[k+2] - b) * v;
+                  dev += fabs (row[k+0] - r) * v;
+                  dev += fabs (row[k+1] - g) * v;
+                  dev += fabs (row[k+2] - b) * v;
                   if (img_has_alpha)
                     dev += a->col[(ty + y) * a->width * 3 + (tx + x) * 3] * v;
                 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]