← Back to team overview

yade-dev team mailing list archive

Re: If-condition, [Bruno]

 

2014-11-18 10:06 GMT+01:00 Bruno Chareyre <bruno.chareyre@xxxxxxxxxxxxxxx>:
> Yes, I check if cell->info().Pcondition is true.
> It is a bool. Does it give a warning to type "if(bool)"?!

(cell->info().Pcondition=true)

Here you do not check, whether cell->info().Pcondition returns true, you assign
to cell->info().Pcondition the "true" value and check, whether this operation
returns true. You probably needed to write then:

(cell->info().Pcondition==true) or just (cell->info().Pcondition)

Cheers

Anton


Follow ups

References