Boris Zbarsky wrote:
Justin Wood (Callek) wrote:
if (NS_FAILED(rv) || (nsnull == cookieService)) {
#ifdef DEBUG
printf("Unable to instantiate Cookie Manager\n");
#endif
}
...
That would save some cycles on checking those conditions.
I would expect that any modern compiler will optimize away any if block
with an empty body if the condition has no side-effects. Like the one
here.
Please test and let me know whether I'm right, though. ;)
I would assume the same, (of course I am not about to check ;-) )
Though, I personally hate to leave those types of things to chance.
~Justin Wood (Callek)
_______________________________________________
mozilla-layout mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-layout