Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changes between Initial Version and Version 1 of CodingTips


Ignore:
Timestamp:
2012-08-09T21:18:13Z (9 years ago)
Author:
Jiri Svoboda
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • CodingTips

    v1 v1  
     1= Coding Tips =
     2
     3== Preprocessor defines, macros, inline functions ==
     4
     5 * Prefer using {{{enum}} instead of preprocessor defines for constants
     6   * Preprocessor defines are only necessary when you are using the constant both in C and assembly sources
     7 * Prefer using static inline functions instead of preprocessor macros
     8  * Preprocessor macros are only needed (a) for type polymorphism, (b) if the result needs to be an l-value (R/W accessor)
     9 * Prefer using regular functions to static inline functions
     10  * Practically never needed, it is just premature optimization