summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-07-31 10:41:39 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-07-31 10:41:39 +0900
commit2d4d836018387470b5df2c59119ab6cc81188e94 (patch)
treed7efe84a455fd0d28b8e3b5ff05e81b81d7d3fd6
parent573d0cf586573a1c9907b45a791f4289ddc7a11c (diff)
elm gesture layer - use fabs not abs when actually comparing floats
2 abs uses should have been fabs as they compe a src float with anot her float. found by PVS studio @fix
-rw-r--r--src/lib/elementary/elm_gesture_layer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/elementary/elm_gesture_layer.c b/src/lib/elementary/elm_gesture_layer.c
index 38af0fdf3a..3a29734216 100644
--- a/src/lib/elementary/elm_gesture_layer.c
+++ b/src/lib/elementary/elm_gesture_layer.c
@@ -2530,8 +2530,8 @@ _momentum_test(Evas_Object *obj,
2530 st->line_end.y = pe_local.y; 2530 st->line_end.y = pe_local.y;
2531 st->t_end = pe_local.timestamp; 2531 st->t_end = pe_local.timestamp;
2532 2532
2533 if ((abs(st->info.mx) > ELM_GESTURE_MINIMUM_MOMENTUM) || 2533 if ((fabs(st->info.mx) > ELM_GESTURE_MINIMUM_MOMENTUM) ||
2534 (abs(st->info.my) > ELM_GESTURE_MINIMUM_MOMENTUM)) 2534 (fabs(st->info.my) > ELM_GESTURE_MINIMUM_MOMENTUM))
2535 state_to_report = ELM_GESTURE_STATE_END; 2535 state_to_report = ELM_GESTURE_STATE_END;
2536 else 2536 else
2537 state_to_report = ELM_GESTURE_STATE_ABORT; 2537 state_to_report = ELM_GESTURE_STATE_ABORT;