Thiago Macieira > Another thing to be very, VERY careful is about nested function call > chains, as in: > > if (foo(bar(), baz(quux()), variable, xyz()) == variable) > > Can you tell me if bar, baz, quux, or xyz modify variable? If so, what > is the call order?
If any of bar, baz, quux or xyz plausibly might modify variable, then this code has undefined behaviour - because the call order is undefined. (... except for quux() being called before baz; and baz, bar and xyz being called before foo, of course; the point in all that at which variable's value gets read is indeterminate, any which way.) Not that I see how this bears on whether that complex call to foo() should be extracted as a separate method, Eddy. _______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development