summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-06-12 16:51:14 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-06-14 18:14:46 +0200
commitff7dc79c842bdc1c06c6616622a78a54992d9853 (patch)
tree97a84699d06c262bde180d8e708c5a9970f17b42
parent216e20c26442fc3f46644635986216e8efcb96e1 (diff)
spline-widget: match sign for control point indexing
-rw-r--r--spline-widget/functionconfig.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/spline-widget/functionconfig.cpp b/spline-widget/functionconfig.cpp
index 9fdeebac..3cc17424 100644
--- a/spline-widget/functionconfig.cpp
+++ b/spline-widget/functionconfig.cpp
@@ -145,7 +145,8 @@ void Map::reload() {
else if (input[0].x() > 1e-2)
input.prepend(QPointF(0, 0));
- for (unsigned i = 0; i < sz; i++) {
+ for (int i = 0; i < int(sz); i++)
+ {
const QPointF p0 = ensureInBounds(input, i - 1);
const QPointF p1 = ensureInBounds(input, i);
const QPointF p2 = ensureInBounds(input, i + 1);
@@ -180,7 +181,7 @@ void Map::reload() {
}
float last = 0;
- for (int i = 0; i < (int)sz; i++)
+ for (unsigned i = 0; i < sz; i++)
{
if (data[i] < 0)
data[i] = last;