[osg-users] warning C6246 UpdateVisitor

Robert Osfield robert.osfield at gmail.com
Mon Mar 3 01:26:23 PST 2008


Ahh you gotta love when a complier complains about perfectly legal and
correct C++ code.  The code *is* correct, its the warning that is
being stupid whilst "trying" to be extra clever.  What compiler are
you using?

On Mon, Mar 3, 2008 at 3:35 AM, IceSharK <iceshark at gmail.com> wrote:
>
> Hi~
>
>
>
> warning C6246: Local declaration of <variable> hides declaration of same
> name in outer scope. Additional Information: See previous declaration at
> <location>.
>
>
> This warning indicates that two declarations have the same name at local
> scope. The name at outer scope is hidden by the declaration at the inner
> scope. Any intended use of the outer scope declaration will result in the
> use of local declaration.
>
> OSG 2.3.4
>
> UpdateVisitor
>
> #91
> osg::NodeCallback* callback = geode.getUpdateCallback();
>             if (callback) (*callback)(&geode,this);
>
>             // Call the app callbacks on the drawables.
>             for(unsigned int i=0;i<geode.getNumDrawables();++i)
>             {
>                 osg::Drawable::UpdateCallback* callback =
> geode.getDrawable(i)->getUpdateCallback();
>                  if (callback) callback->update(this,geode.getDrawable(i));
>
>                 handle_callbacks(geode.getDrawable(i)->getStateSet());
>             }
> _______________________________________________
>  osg-users mailing list
>  osg-users at lists.openscenegraph.org
>  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>


More information about the osg-users mailing list