Skip to content
Snippets Groups Projects
Commit 8f059144 authored by Christoph Grüninger's avatar Christoph Grüninger
Browse files

[splinecommon_] Use idx instead of i

Otherwise the reverse feature would not work.
This bug exists since the beginning of splinecommon_.

Thanks Timo for spotting a mistake I'd introduced.
parent ba6a726e
No related branches found
No related tags found
1 merge request!2897[splinecommon_] Wrong index variable and other fixes
Pipeline #10193 passed
+2
...@@ -347,8 +347,8 @@ protected: ...@@ -347,8 +347,8 @@ protected:
int idx = i; int idx = i;
if (reverse) if (reverse)
idx = numSamples - i - 1; idx = numSamples - i - 1;
destX[i] = (*it)[0]; destX[idx] = (*it)[0];
destY[i] = (*it)[1]; destY[idx] = (*it)[1];
} }
} }
...@@ -382,8 +382,8 @@ protected: ...@@ -382,8 +382,8 @@ protected:
int idx = i; int idx = i;
if (reverse) if (reverse)
idx = numSamples - i - 1; idx = numSamples - i - 1;
destX[i] = std::get<0>(*it); destX[idx] = std::get<0>(*it);
destY[i] = std::get<1>(*it); destY[idx] = std::get<1>(*it);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment