Evas gesture: do not use abs when dealing with double, use fabs instead

Summary: clang reports a warning here. We compare the result of abs (casting to an int, returning an int) to a double value. Hence we should use fabs instead

Test Plan: compilation

Reviewers: Jaehyun, Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9024
This commit is contained in:
Vincent Torri 2019-05-27 15:56:41 +09:00 committed by Hermet Park
parent 7eef03a041
commit 0732606118
1 changed files with 2 additions and 2 deletions

View File

@ -175,8 +175,8 @@ _efl_canvas_gesture_recognizer_momentum_efl_canvas_gesture_recognizer_recognize(
pd->t_end = efl_gesture_touch_cur_timestamp_get(event);
efl_gesture_hotspot_set(gesture, pd->end_line);
if ((abs(md->momentum.x) > EFL_GESTURE_MINIMUM_MOMENTUM) ||
(abs(md->momentum.y) > EFL_GESTURE_MINIMUM_MOMENTUM))
if ((fabs(md->momentum.x) > EFL_GESTURE_MINIMUM_MOMENTUM) ||
(fabs(md->momentum.y) > EFL_GESTURE_MINIMUM_MOMENTUM))
result = EFL_GESTURE_FINISH;
else
result = EFL_GESTURE_CANCEL;