aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjthorn <jthorn@a491c6a4-70bf-4b89-8b36-d6c0cb1f094e>2004-06-13 21:10:22 +0000
committerjthorn <jthorn@a491c6a4-70bf-4b89-8b36-d6c0cb1f094e>2004-06-13 21:10:22 +0000
commitb7a0057265692c72fa357c9f6821ed7428ed5202 (patch)
tree4ff0afd701ccfe45e8d9a281c7707ea710667924
parent7e483a30b750e030d7dee8a858094a70e36255b3 (diff)
* add lots more parentheses to macros
SpaceMask_SetStateBits SpaceMask_CheckStateBits * remove trailing ';' from macro SpaceMask_SetStateBits since that's supposed to be supplied when the macro is used git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/SpaceMask/trunk@45 a491c6a4-70bf-4b89-8b36-d6c0cb1f094e
-rw-r--r--src/SpaceMask.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/SpaceMask.h b/src/SpaceMask.h
index fe941f6..7e564b0 100644
--- a/src/SpaceMask.h
+++ b/src/SpaceMask.h
@@ -92,7 +92,7 @@ extern SpaceMask_Registry* spacemask_Registry;
#ifdef CCODE
#define SpaceMask_SetStateBits(mask, ijk, type_bits, state_bits) \
- mask[ijk] = (mask[ijk] & ~type_bits) | state_bits;
+ (mask)[ijk] = (((mask)[ijk] & ~(type_bits)) | (state_bits))
#endif
/*@@
@@ -112,7 +112,7 @@ extern SpaceMask_Registry* spacemask_Registry;
#ifdef CCODE
#define SpaceMask_CheckStateBits(mask, ijk, type_bits, state_bits) \
- (mask[ijk] & type_bits) == state_bits
+ (((mask)[ijk] & (type_bits)) == (state_bits))
#endif
#endif /* __CACTUSEINSTEIN_SPACEMASK_H__ */