From 04975b46184a6afbe2f5dd3646326804d5d5bd61 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 30 Apr 2025 10:32:16 +1000 Subject: [PATCH] Constify libinput_config_accel_set_points() We copy the contents of the double array so let's constify this. Fixes: 5324f425a163 ("Introduce custom acceleration profile") Closes #1114 Part-of: --- src/libinput.c | 4 +++- src/libinput.h | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/libinput.c b/src/libinput.c index 5273f094..5e331098 100644 --- a/src/libinput.c +++ b/src/libinput.c @@ -4444,7 +4444,9 @@ libinput_device_config_accel_apply(struct libinput_device *device, LIBINPUT_EXPORT enum libinput_config_status libinput_config_accel_set_points(struct libinput_config_accel *config, enum libinput_config_accel_type accel_type, - double step, size_t npoints, double *points) + double step, + size_t npoints, + const double *points) { if (config->profile != LIBINPUT_CONFIG_ACCEL_PROFILE_CUSTOM) return LIBINPUT_CONFIG_STATUS_INVALID; diff --git a/src/libinput.h b/src/libinput.h index 9ae5b639..8d58b5af 100644 --- a/src/libinput.h +++ b/src/libinput.h @@ -5775,7 +5775,9 @@ enum libinput_config_accel_type { enum libinput_config_status libinput_config_accel_set_points(struct libinput_config_accel *accel_config, enum libinput_config_accel_type accel_type, - double step, size_t npoints, double *points); + double step, + size_t npoints, + const double *points); /** * @ingroup config