[gst-devel] [gst-cvs] gstreamer: micro-optim: if (x) is cheaper than if (x > 0) for unsigned integers

Wes Miller wmiller at sdr.com
Fri Dec 3 13:34:01 CET 2010


Take it from a visually impaired person, if (x) and if (x>0) are both quite
readable compared to the slammed together, no whitespace, { on the
end-of-line eye-tests some people churn out.  Thank God for beautifiers.

And besides, good practice says that ought to be if (0<x) as a form of the
practice to prevent the dreader (if(x=0) // single =.

Wes
-- 
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Re-gst-cvs-gstreamer-micro-optim-if-x-is-cheaper-than-if-x-0-for-unsigned-integers-tp3070953p3070998.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.




More information about the gstreamer-devel mailing list