Last active
December 12, 2015 03:08
-
-
Save lawrencelomax/4704470 to your computer and use it in GitHub Desktop.
Enumeration of NULL terminated Varargs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define ENUMERATE_NULL_TERMINATED_VARARGS(firstArgument, type, argumentName, operation) \ | |
{ \ | |
va_list arguments; \ | |
va_start(arguments, firstArgument); \ | |
type argumentName = firstArgument; \ | |
while (argumentName) \ | |
{ \ | |
{ \ | |
operation \ | |
} \ | |
argumentName = va_arg(arguments, GLenum); \ | |
} \ | |
va_end(arguments); \ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment