Hi Torben, There are only two enum entries in the DepthPartitionSettings::DepthMode, so it looks like it's a compile bug to me, as the switch statement does actual provide case statements for all the possible variants of the mode. Which version of VS are you using?
I'll merge the change as it's benign, but it still is just a crappy compiler barking a false positive... Robert. On Fri, Mar 11, 2011 at 9:42 PM, Torben Dannhauer <[email protected]> wrote: > Hi Robert, > > this small modification fixes a compile warning (C4715) in MS Visual Studio, > which is caused in src/osgViewer/View.cpp because not all control pathes > return a value. > > It is caused by a switch() structure, which does not use a default action. I > added a default action with the default return value used in the same > function some lines earlier. > > > Code: > > bool DepthPartitionSettings::getDepthRange(osg::View& view, unsigned int > partition, double& zNear, double& zFar) > { > switch(_mode) > { > case(FIXED_RANGE): > { > ... > return false; > } > case(BOUNDING_VOLUME): > { > ... > return false; > } > default: return false; // This is the newly added line > } > } > > > > > > Tested on Win7. > > Cheers, > Torben[/code] > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=37560#37560 > > > > > _______________________________________________ > osg-submissions mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > > _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
