Daily Archives: May 10, 2006

What’s Wrong with this code? – 2

What’s wrong with this code?

UINT a;
.
.
.
DoSomething(HIWORD(a));
void DoSomething(int x)
{
 if (x < 0)
 {
  //do something
 }
 
}

I recently ran into this in some code I was working on.


Check out my latest book, the essential, in-depth guide to performance for all .NET developers:

Writing High-Performance.NET Code, 2nd Edition by Ben Watson. Available for pre-order: