Skip to content

Instantly share code, notes, and snippets.

@zenubis
Created December 18, 2014 05:58
Show Gist options
  • Save zenubis/fadb1692ce6676b0add8 to your computer and use it in GitHub Desktop.
Save zenubis/fadb1692ce6676b0add8 to your computer and use it in GitHub Desktop.
#define BIT_SET(variable, flag) (variable) |= (flag)
#define BIT_TEST(variable, flag) (((variable) & (flag)) == (flag))
#define BIT_REMOVE(variable, flag) ((variable &= ~(flag)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment