News for hackers. Stuff that matters.
Re:Which one will execute faster, if(flag==0) or if(0==flag)? by andrewf on Saturday January 08, 2011 @05:41AM (#2082811)
If one side of the expression is longer, putting the shorter one first can improve readability. (Some would argue that you should assign the longer expression to a variable first).

I think that

  if(S_OK == QueryInterface(IID_IUnknown, &p)) {
is clearer than

  if(QueryInterface(IID_IUnknown, &p) == S_OK) {

There are no comments on this comment yet.