summaryrefslogtreecommitdiffhomepage
path: root/spline
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-11-14 15:09:06 +0100
committerStanislaw Halik <sthalik@misaki.pl>2017-11-14 16:17:18 +0100
commit7807af2f4571a829625930f0593738b94de4247a (patch)
treedc95c8b57971eea642fcdfc788b8ea634044398c /spline
parent12b5ccee001661dba4490263d39c426b3b4d9097 (diff)
spline: cleanup warning
Diffstat (limited to 'spline')
-rw-r--r--spline/spline.cpp4
1 files changed, 1 insertions, 3 deletions
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;
- }
}
}
}