On 2011-02-18 at 09:22:36 [+0100], Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> wrote: > Stefano Ceccherini<stefano.ceccherini@xxxxxxxxx> wrote: > > 2011/2/18 Michael Pfeiffer <michael.w.pfeiffer@xxxxxxxxx>: > > >> Although I think I've seen this kind of style used a lot of times by > > >> Ingo, Axel, Stephan, and I actually used it too. > > > I just quoted the rule, it should be removed from the guidelines if > > > it is not valid. > > Of course, I agree. > > It should only be changed to allow this specific use case, as this actually > helps to write cleaner code (when you know the idiom, it's very easy to > read). > However, things like: > if ((status = file.SetTo(...)) == B_OK) > > should still be avoided. Hm, I'm sorry to say that the package kit is full of these little buggers. And I'm pretty sure I didn't dare to invent them myself but saw them somewhere (in "trusted" code). BTW: I have switched to using Stephan's suggested use of braces around multi-line if-expressions (I have been convinced: it *does* look cleaner). Anyway, as long as nobody is ever looking at the package kit, I guess I'm doing just fine ;-) cheers, Oliver