[SDL] Const correctness for SDL video

Ryan C. Gordon icculus at icculus.org
Wed Feb 14 15:17:19 PST 2007


> If you use:
> 
> If ( 0 = rect.h )
> 
> You will get a compiler error since you cannot assign rect.h to the 
> constant 0.
> 
> So this particular example is not valid.

How about "if (rect.h = 0)", then?

It'll also catch things like passing arguments to memcpy() in the wrong 
order, etc, too.

--ryan.



More information about the SDL mailing list