|
|
William F Pokorny <ano### [at] anonymousorg> wrote:
> On 05/15/2017 12:46 PM, clipka wrote:
> > Folks,
> >
> > I'm trying out a new approach at fixing the sphere sweep issues; please
> > give this version a thorough test:
> >
> > https://github.com/POV-Ray/povray/tree/experimental/sphere_sweep
> >
> > I'll build Windows binaries as soon as I find the time.
> >
> Christoph,
>
> Isn't your use of 'i' in the for loop at line 627 of spheresweep.cpp
> muddling with the 'i' (DBL) used later at line 648 ?
I confess I didn't pay attention to that, but it shouldn't be a problem, as the
C++ standard is pretty clear about what should happen in this situation: The
scope of any variable declared in a `for` statement is limited to that `for`
statement.
If I remember correctly, in old versions of MSVC the scope of such variables
would continue after the loop, but modern versions are standard-compliant by
default.
But yes, it might be prettier to rename that variable to `n` instead.
Post a reply to this message
|
|