mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-10 19:50:21 +01:00
touchpad: constify a few helper functions
May help the compiler with further optimization Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
d1d3ea4d06
commit
2a16c522b9
2 changed files with 5 additions and 3 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue