summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2019-05-27 15:56:41 +0900
committerHermet Park <hermetpark@gmail.com>2019-05-27 15:56:41 +0900
commit0732606118ed5d740c049b173e60c02c550c34d5 (patch)
treedd41a0f7a9f461c6358c39a4457cfe1ba5bd0849
parent7eef03a041051a170e661aadcfa8628e4b8b2189 (diff)
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
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer_momentum.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_momentum.c b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_momentum.c
index 34c9030ad3..2e007cc0f9 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_momentum.c
+++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_momentum.c
@@ -175,8 +175,8 @@ _efl_canvas_gesture_recognizer_momentum_efl_canvas_gesture_recognizer_recognize(
175 pd->t_end = efl_gesture_touch_cur_timestamp_get(event); 175 pd->t_end = efl_gesture_touch_cur_timestamp_get(event);
176 efl_gesture_hotspot_set(gesture, pd->end_line); 176 efl_gesture_hotspot_set(gesture, pd->end_line);
177 177
178 if ((abs(md->momentum.x) > EFL_GESTURE_MINIMUM_MOMENTUM) || 178 if ((fabs(md->momentum.x) > EFL_GESTURE_MINIMUM_MOMENTUM) ||
179 (abs(md->momentum.y) > EFL_GESTURE_MINIMUM_MOMENTUM)) 179 (fabs(md->momentum.y) > EFL_GESTURE_MINIMUM_MOMENTUM))
180 result = EFL_GESTURE_FINISH; 180 result = EFL_GESTURE_FINISH;
181 else 181 else
182 result = EFL_GESTURE_CANCEL; 182 result = EFL_GESTURE_CANCEL;