[gegl] absolute: remove custom inlined fabs
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] absolute: remove custom inlined fabs
- Date: Wed, 27 May 2020 18:38:07 +0000 (UTC)
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]