On Mon, 24 Apr 2017 10:01:31 +0200
Anselm R Garbe <garbeam_AT_gmail.com> wrote:
Hey Anselm,
> I'd prefer a define instead of a one-line function.
a macro does not bring any advantages to the table, but some
disadvantages. It makes it harder to analyze the binaries when debug
symbols are compiled in, because everything happens in the CPP. Also,
the compiler will be smart enough to inline a one-line-function, so
there's no loss. I personally avoid function-macros as much as I can
and only use it where it's not possible with a normal function.
But that's my opinion. What do the others think?
With best regards
Laslo
--
Laslo Hunhold <dev_AT_frign.de>
Received on Mon Apr 24 2017 - 10:14:58 CEST