Skip to content

Instantly share code, notes, and snippets.

@lawrencelomax
Last active December 12, 2015 03:08
Show Gist options
  • Save lawrencelomax/4704470 to your computer and use it in GitHub Desktop.
Save lawrencelomax/4704470 to your computer and use it in GitHub Desktop.
Enumeration of NULL terminated Varargs
#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