Please DON'T post in ftlk.bugs ! This is for the STR management only.
IIRC you'v been told this already.  Your posting should be in
fltk.general.

On 05.03.2010 at 10:23, Domingo Alvarez Duarte wrote:

-- snip --

> What follow is the output from the compiler and some possible solutions
> (at least when I could guess what is intended), I invite anyone to
> exercise his/her knowledge of c++ and try find what should be done:
>
> Adjuster.cxx: In member function 'virtual void fltk::Adjuster::draw()':
> Adjuster.cxx:83: warning: suggest parentheses around arithmetic in
> operand of '|'
>
> !!!!!!!!!!!! what's intended here !!!!!!!!!!!!!!!
> from: Flags flags = this->flags() & ~(STATE|PUSHED|HIGHLIGHT) | OUTPUT;
> to: Flags flags = this->flags() & ( (~(STATE|PUSHED|HIGHLIGHT)) | OUTPUT );

Absolutely wrong! You must learn the c/c++ rules (operator precedences)
before trying to fix this.

Hint: '&' has higher precedence than '|'.

And yes, the compiler messages are annoying, mainly because they suggest
to add parentheses where normal rules apply and the code is okay.

Albrecht
_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs

Reply via email to