Revision: 73085
http://sourceforge.net/p/brlcad/code/73085
Author: brlcad
Date: 2019-05-18 03:28:04 +0000 (Sat, 18 May 2019)
Log Message:
-----------
don't leave stray semicolons, let the macros behave
Modified Paths:
--------------
brlcad/trunk/src/libbu/bitv.c
Modified: brlcad/trunk/src/libbu/bitv.c
===================================================================
--- brlcad/trunk/src/libbu/bitv.c 2019-05-17 13:48:11 UTC (rev 73084)
+++ brlcad/trunk/src/libbu/bitv.c 2019-05-18 03:28:04 UTC (rev 73085)
@@ -42,14 +42,14 @@
*
* LLVM 3.2 complains about a static inline function here, so use a macro
instead
*/
-#define COUNT_ONES32(x) { \
- x -= ((x >> 1) & 0x55555555); \
- x = (((x >> 2) & 0x33333333) + (x & 0x33333333)); \
- x = (((x >> 4) + x) & 0x0f0f0f0f); \
- x += (x >> 8); \
- x += (x >> 16); \
- x &= 0x0000003f; \
-}
+#define COUNT_ONES32(x) do { \
+ x -= ((x >> 1) & 0x55555555); \
+ x = (((x >> 2) & 0x33333333) + (x & 0x33333333)); \
+ x = (((x >> 4) + x) & 0x0f0f0f0f); \
+ x += (x >> 8); \
+ x += (x >> 16); \
+ x &= 0x0000003f; \
+ } while (0)
/**
@@ -60,15 +60,15 @@
*
* LLVM 3.2 complains about a static inline function here, so use a macro
instead
*/
-#define FLOOR_ILOG2(x) { \
- x |= (x >> 1); \
- x |= (x >> 2); \
- x |= (x >> 4); \
- x |= (x >> 8); \
- x |= (x >> 16); \
- x >>= 1; \
- COUNT_ONES32(x) \
-}
+#define FLOOR_ILOG2(x) do { \
+ x |= (x >> 1); \
+ x |= (x >> 2); \
+ x |= (x >> 4); \
+ x |= (x >> 8); \
+ x |= (x >> 16); \
+ x >>= 1; \
+ COUNT_ONES32(x); \
+ } while (0)
/**
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits