[Bf-committers] Not adding #defined code in sources please
Ton Roosendaal
ton at blender.org
Fri Jan 25 13:31:59 CET 2013
Hi,
As part of our style guide, I propose to limit 'fake inlining' with #defines of code to an absolute minumum.
It makes debugging (breakpoints, code stepping) impossible, and makes code less readable.
This is totally unnecessary for example:
http://projects.blender.org/scm/viewvc.php/trunk/blender/source/blender/editors/sculpt_paint/paint_vertex.c?root=bf-blender&r1=53285&r2=53321
Also defines like "LIKELY" or "UNLIKELY" should go away - unless in local code segments that require heavily optimizing.
Adding inline functions should also be limited to cases where it's proven to be required and giving massive speedups. Optimizing in general shouldn't be needed ever. Good code design is always superior.
So let's stop attempting to do code clean work now, unless approved in advance by the people who actively work on that code.
Laters,
-Ton-
------------------------------------------------------------------------
Ton Roosendaal Blender Foundation ton at blender.org www.blender.org
Blender Institute Entrepotdok 57A 1018AD Amsterdam The Netherlands
More information about the Bf-committers
mailing list