Hi Robert, >> 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()); >> } > > 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?
It's most probably some version of Visual C++ (the "warning Cxxxx" message gives it away). The code might be correct, but I would call it confusing. Just giving a different name to the inner variable (like "drawableCallback") would make it clearer. Otherwise, reading the code quickly, one might get confused as to which "callback" variable is being used. Anyways, as most code style issues, it's really up to preference, and I agree that it isn't the compiler's place to comment on style. :-) J-S -- ______________________________________________________ Jean-Sebastien Guay [EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org