From f31d26669dffbecadb674a3d059b91364487ae4f Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Tue, 14 Jun 2022 16:20:41 +0300 Subject: [PATCH] tests/color_util: constify *_stat_update() These arguments are not meant to be changed, and a new test will need this const. Signed-off-by: Pekka Paalanen --- tests/color_util.c | 7 +++++-- tests/color_util.h | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/tests/color_util.c b/tests/color_util.c index acbd040a..4b1471d6 100644 --- a/tests/color_util.c +++ b/tests/color_util.c @@ -374,7 +374,9 @@ lcmsMAT3_invert(struct lcmsMAT3 *result, const struct lcmsMAT3 *mat) } void -scalar_stat_update(struct scalar_stat *stat, double val, struct color_float *pos) +scalar_stat_update(struct scalar_stat *stat, + double val, + const struct color_float *pos) { if (stat->count == 0 || stat->min > val) { stat->min = val; @@ -441,7 +443,8 @@ rgb_diff_stat_print(const struct rgb_diff_stat *stat, void rgb_diff_stat_update(struct rgb_diff_stat *stat, - struct color_float *ref, struct color_float *val) + const struct color_float *ref, + const struct color_float *val) { unsigned i; double ssd = 0.0; diff --git a/tests/color_util.h b/tests/color_util.h index 2278c874..724ff04a 100644 --- a/tests/color_util.h +++ b/tests/color_util.h @@ -139,7 +139,9 @@ struct rgb_diff_stat { }; void -scalar_stat_update(struct scalar_stat *stat, double val, struct color_float *pos); +scalar_stat_update(struct scalar_stat *stat, + double val, + const struct color_float *pos); float scalar_stat_avg(const struct scalar_stat *stat); @@ -149,7 +151,8 @@ scalar_stat_print_float(const struct scalar_stat *stat); void rgb_diff_stat_update(struct rgb_diff_stat *stat, - struct color_float *ref, struct color_float *val); + const struct color_float *ref, + const struct color_float *val); void rgb_diff_stat_print(const struct rgb_diff_stat *stat,