diff options
author | Daniel Mack <daniel@zonque.org> | 2016-01-10 18:11:22 +0100 |
---|---|---|
committer | Daniel Mack <daniel@zonque.org> | 2016-01-11 12:02:36 +0100 |
commit | d5b26d50fca744d1b19eb8c125b047c18c61ad94 (patch) | |
tree | 54a510fc8e7098178eb474cd2d8ac1be38e549e2 /src/basic/strxcpyx.h | |
parent | 201f0c916d8f65ad2595a651b1371fcd39a4cf55 (diff) |
macro.h: provide a switch-case statement generator for IN_SET
Rather than walking a list of valid values one-by-one, generate a
switch-case statement for the IN_SET() macro. This allows the compiler to
further optimize its code output, possibly by generating jump tables.
This effectively decreases the binary size slightly.
The implementation is based on macro overloading depending on the number of
arguments. h/t to the following post:
https://stackoverflow.com/questions/11761703/overloading-macro-on-number-of-arguments
Diffstat (limited to 'src/basic/strxcpyx.h')
0 files changed, 0 insertions, 0 deletions