blurstudio / TwistSpline

A smoothly reparameterizing Bezier spline that also interpolates orientations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question of potential code-mistake

ivogrig opened this issue · comments

https://github.com/blurstudio/TwistSpline/blob/master/twistSpline.h#L164

In the multiLinearIndexes function the argument "samp" is not used,
Should this line rather be that? (I did read that this function is obsolete or unused but it came up as a compilation error)

if (!capped && t >= samp[segIdx + 1]) {

Some compilers seem to also complain about the redundant qualifier in this line:
https://github.com/blurstudio/TwistSpline/blob/master/twistSplineNode.h#L123

Best,
Ivo

Yep. Looks like you're right in both cases.

Looks like I've just never called multiLinearIndices, so it didn't show up as a bug for me. And VS didn't flag it.
And the redundant qualifier is an easy fix.

Thanks for finding those!