From 7807af2f4571a829625930f0593738b94de4247a Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 14 Nov 2017 15:09:06 +0100 Subject: spline: cleanup warning --- spline/spline.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'spline/spline.cpp') diff --git a/spline/spline.cpp b/spline/spline.cpp index 2d741474..119723fd 100644 --- a/spline/spline.cpp +++ b/spline/spline.cpp @@ -238,10 +238,8 @@ void spline::update_interp_data() const int x = int(.5 * c * (cx[0] + cx[1] * t + cx[2] * t2 + cx[3] * t3)); const float y = float(.5 * (cy[0] + cy[1] * t + cy[2] * t2 + cy[3] * t3)); - if (x >= 0 && x < value_count) - { + if (unsigned(x) < value_count) data[x] = y; - } } } } -- cgit v1.2.3