summaryrefslogtreecommitdiff
path: root/include/global.h
diff options
context:
space:
mode:
authornotyourav <65437533+notyourav@users.noreply.github.com>2021-03-17 20:23:01 -0700
committerGitHub <noreply@github.com>2021-03-17 20:23:01 -0700
commit8b812692714e76cca2bb9e643f6b1984cddedd9c (patch)
tree5cbdee9825dd1c2763d04c3add11c9ac077350e3 /include/global.h
parenta39686c24c4b1acc2459088659c6f648b7dff80e (diff)
parent2d1b0da52ef1e51abfb5b57b8954602740bd146e (diff)
Merge branch 'master' into ply
Diffstat (limited to 'include/global.h')
-rw-r--r--include/global.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/global.h b/include/global.h
index 6d7f2311..489f276d 100644
--- a/include/global.h
+++ b/include/global.h
@@ -31,9 +31,9 @@
#define SWAP(a, b, temp) \
{ \
- temp = a; \
- a = b; \
- b = temp; \
+ (temp) = a; \
+ (a) = b; \
+ (b) = temp; \
}
// useful math macros
@@ -47,7 +47,7 @@
#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) >= (b) ? (a) : (b))
-#define BOOLCAST(x) ((-x | x) >> 31)
+#define BOOLCAST(x) ((-(x) | (x)) >> 31)
#define static_assert(cond) extern char assertion[(cond) ? 1 : -1]
#if NON_MATCHING