You are absolutely right, there should be parentheses around the or-statements. The intent was to enter the while loop when either “file”, “ImageSequence” or “Image” was found. The matched bool is used to catch break condition for the same loop (because fr is only incremented when we have a match).
This could be probably be done in a more elegant way but I just modified the cubemap reader to create this patch. Cheers /Johan On Mon, Oct 19, 2015 at 2:06 AM, Jannik Heller <[email protected]> wrote: > Hi Johan, > > I get a compiler warning here: > > src/osgWrappers/deprecated-dotosg/osg/Texture2DArray.cpp:38:34: warning: > suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] > fr[0].matchWord("Image") && matched) > > I think the if statement should look like this instead: > > > Code: > > while ((fr[0].matchWord("file") || > fr[0].matchWord("ImageSequence") || > fr[0].matchWord("Image")) && matched) > > > > > Could you clarify what your intent on this line was when you made the > submission. > > Thanks, > Jannik > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=65370#65370 > > > > > > _______________________________________________ > 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
