From: Peter Hutterer Date: Mon, 12 Dec 2016 23:54:30 +0000 (+1000) Subject: touchpad: constify a few helper functions X-Git-Tag: 1.5.901~25 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2a16c522b9c08b34e0586912cb6423e0493e6489;p=platform%2Fupstream%2Flibinput.git touchpad: constify a few helper functions May help the compiler with further optimization Signed-off-by: Peter Hutterer --- diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index 762f5396..7bac8ecd 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -476,7 +476,7 @@ tp_process_key(struct tp_dispatch *tp, } static void -tp_unpin_finger(struct tp_dispatch *tp, struct tp_touch *t) +tp_unpin_finger(const struct tp_dispatch *tp, struct tp_touch *t) { double xdist, ydist; diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h index db0a51a4..b9ca5bff 100644 --- a/src/evdev-mt-touchpad.h +++ b/src/evdev-mt-touchpad.h @@ -388,7 +388,8 @@ tp_libinput_context(const struct tp_dispatch *tp) } static inline struct normalized_coords -tp_normalize_delta(struct tp_dispatch *tp, struct device_float_coords delta) +tp_normalize_delta(const struct tp_dispatch *tp, + struct device_float_coords delta) { struct normalized_coords normalized; @@ -403,7 +404,8 @@ tp_normalize_delta(struct tp_dispatch *tp, struct device_float_coords delta) * in the x-axis' coordinate space. */ static inline struct device_float_coords -tp_unnormalize_for_xaxis(struct tp_dispatch *tp, struct normalized_coords delta) +tp_unnormalize_for_xaxis(const struct tp_dispatch *tp, + struct normalized_coords delta) { struct device_float_coords raw;