Hi Jannik,

Turns out that I fixed this  warning as part of other work last week but
haven't checked this work in yet as I still have testing and code reviews
to do it.  I have just done a diff against your changes and it's similar in
the batch of OR statements are all placed in their own (), but I moved the
matched && to the beginning of the while() condition so that if matched is
set to false then it immediately comes out of the comparison rather than
evaluating the OR based conditionals.  My code looks like:

    while (matched && (fr[0].matchWord("file") ||
fr[0].matchWord("ImageSequence") || fr[0].matchWord("Image")))
    {
     ...
     }

I'm still double checking my other work, but should have it checked in
tomorrow if testing/reviews all go smoothly.

Cheers,
Robert


On 19 October 2015 at 13:18, Jannik Heller <[email protected]> wrote:

> Hi Robert,
>
> This patch fixes a compiler warning for an if statement in
> Texture2DArray.cpp, and changes the operator precedence as originally
> intended by Johan (
> http://forum.openscenegraph.org/viewtopic.php?p=65372#65372 ).
>
> src/osgWrappers/deprecated-dotosg/osg/Texture2DArray.cpp:38:34: warning:
> suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
> fr[0].matchWord("Image") && matched)
>
> Thank you!
>
> Cheers,
> Jannik
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=65376#65376
>
>
>
>
> _______________________________________________
> 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

Reply via email to