[gegl] absolute: remove custom inlined fabs



commit 0aecbad1c11ee2446c68f4cf20c81894d2abf97a
Author: Øyvind Kolås <pippin gimp org>
Date:   Wed May 27 20:06:15 2020 +0200

    absolute: remove custom inlined fabs

 operations/common/absolute.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)
---
diff --git a/operations/common/absolute.c b/operations/common/absolute.c
index 970041cc9..82c9e8d1b 100644
--- a/operations/common/absolute.c
+++ b/operations/common/absolute.c
@@ -32,13 +32,6 @@
 
 #include "gegl-op.h"
 
-static inline float own_fabs (float val)
-{
-  if (val < 0.0f)
-    return -val;
-  return val;
-}
-
 static gboolean
 process (GeglOperation       *op,
          void                *in_buf,
@@ -52,9 +45,9 @@ process (GeglOperation       *op,
 
   while (samples--)
     {
-      out[0] = own_fabs (in[0]);
-      out[1] = own_fabs (in[1]);
-      out[2] = own_fabs (in[2]);
+      out[0] = fabsf (in[0]);
+      out[1] = fabsf (in[1]);
+      out[2] = fabsf (in[2]);
       out[3] = in[3];
 
       in += 4;


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