Page MenuHome

Cleanup: convert some macros into functions
Needs ReviewPublic

Authored by Jacques Lucke (JacquesLucke) on Aug 7 2020, 12:48 PM.

Details

Summary

Using functions instead of macros makes code easier to read and makes debugging significantly easier.

Macros had one "advantage", they did not require include statements for various DNA headers.
There are two possible solutions:

  1. Include all the required headers.
  2. Move functions out of headers - make them non-inline.

What do you prefer? In your opinion, should some of the macros not be converted to functions?

Diff Detail

Repository
rB Blender
Branch
macro-to-function-1 (branched from master)
Build Status
Buildable 9402
Build 9402: arc lint + arc unit

Event Timeline

Jacques Lucke (JacquesLucke) requested review of this revision.Aug 7 2020, 12:48 PM
Jacques Lucke (JacquesLucke) created this revision.

Feels like is better to have non-inlined function would be better than pulling more headers. Unless there is an unavidable measurable performance hit on user level.