libprimis icon indicating copy to clipboard operation
libprimis copied to clipboard

Comment or remove variadic macros in `texture.h`

Open no-lex opened this issue 4 years ago • 0 comments

texture.h defines the LOCALPARAMI and LOCALPARAMF macros as well as GLOBALPARAMI GLOBALPARAMF, SETSHADER, and SETVARIANT, all of which are variadic macros (can take arbitrary numbers of arguments). This is undesirable as:

  • ~~C++03 doesn't technically support variadic macros (though C++11 and above does)~~ (we use C++17 now)
  • Macros are ugly and macros that take arbitrary numbers of arguments and occupy the global namespace even more so.

If they are absolutely irreplaceable, comments should be left nearby affirming why this is so.

no-lex avatar May 16 '20 07:05 no-lex