From 8e04a08869cfec0f0473137e580b8571f793da14 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 18 Jan 2018 12:33:55 +0100 Subject: fix -Wall -Wextra -Wpedantic --- spline/spline.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'spline') diff --git a/spline/spline.cpp b/spline/spline.cpp index 2fe73a01..b6fdd9c5 100644 --- a/spline/spline.cpp +++ b/spline/spline.cpp @@ -188,8 +188,8 @@ void spline::update_interp_data() { const double x = points[0].x(); const double y = points[0].y(); - const int max = clamp(iround(x * c), 1, value_count-1); - for (int k = 0; k <= max; k++) + const unsigned max = (unsigned)clamp(iround(x * c), 1, value_count-1); + for (unsigned k = 0; k <= max; k++) { if (k < value_count) data[unsigned(k)] = float(y * k / max); -- cgit v1.2.3