From 79e46cf03c19d2844151c4268252c332dda3c9ae Mon Sep 17 00:00:00 2001 From: TimePath Date: Wed, 6 May 2015 19:30:38 +1000 Subject: [PATCH] Add two useful macros --- qcsrc/common/util-pre.qh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qcsrc/common/util-pre.qh b/qcsrc/common/util-pre.qh index b3aacfa97..a1ac7dc7a 100644 --- a/qcsrc/common/util-pre.qh +++ b/qcsrc/common/util-pre.qh @@ -51,4 +51,7 @@ [[deprecated("use true")]] [[alias("true")]] const bool TRUE; [[deprecated("use false")]] [[alias("false")]] const bool FALSE; +#define BIT(n) (1 << (n)) +#define BITSET(var, mask, flag) (flag ? (var) | (mask) : (var) &~ (mask)) + #endif -- 2.39.2