Revision: 69100
          http://sourceforge.net/p/brlcad/code/69100
Author:   starseeker
Date:     2016-10-17 14:23:02 +0000 (Mon, 17 Oct 2016)
Log Message:
-----------
Use Sean's trick from r68797 to make a semicolon required to help automatic 
code formatters and editors, replace another instance of the pattern.

Revision Links:
--------------
    http://sourceforge.net/p/brlcad/code/68797

Modified Paths:
--------------
    brlcad/trunk/src/librt/librt_private.h
    brlcad/trunk/src/librt/primitives/bot/btg.c
    brlcad/trunk/src/librt/primitives/bot/g_bot_include.c
    brlcad/trunk/src/librt/primitives/bspline/bspline.cpp

Modified: brlcad/trunk/src/librt/librt_private.h
===================================================================
--- brlcad/trunk/src/librt/librt_private.h      2016-10-17 14:16:49 UTC (rev 
69099)
+++ brlcad/trunk/src/librt/librt_private.h      2016-10-17 14:23:02 UTC (rev 
69100)
@@ -44,11 +44,11 @@
 
 /* logic to ensure bboxes are not degenerate in any dimension - zero thickness
  * bounding boxes will get missed by the raytracer */
-#define BBOX_NONDEGEN(min, max, dist) \
+#define BBOX_NONDEGEN(min, max, dist) do {\
     if (NEAR_EQUAL(min[X], max[X], dist)) { \
-       min[X] -= dist; \
-       max[X] += dist; \
-        } \
+       min[X] -= dist; \
+       max[X] += dist; \
+    } \
     if (NEAR_EQUAL(min[Y], max[Y], dist)) { \
        min[Y] -= dist; \
        max[Y] += dist; \
@@ -56,7 +56,8 @@
     if (NEAR_EQUAL(min[Z], max[Z], dist)) { \
        min[Z] -= dist; \
        max[Z] += dist; \
-    }
+    } \
+} while (0)
 
 
 __BEGIN_DECLS

Modified: brlcad/trunk/src/librt/primitives/bot/btg.c
===================================================================
--- brlcad/trunk/src/librt/primitives/bot/btg.c 2016-10-17 14:16:49 UTC (rev 
69099)
+++ brlcad/trunk/src/librt/primitives/bot/btg.c 2016-10-17 14:23:02 UTC (rev 
69100)
@@ -132,7 +132,7 @@
     VMOVE(stp->st_max, tie->amax);
 
     /* zero thickness will get missed by the raytracer */
-    BBOX_NONDEGEN(stp->st_min, stp->st_max, rtip->rti_tol.dist)
+    BBOX_NONDEGEN(stp->st_min, stp->st_max, rtip->rti_tol.dist);
 
     VMOVE(stp->st_center, tie->mid);
     stp->st_aradius = tie->radius;

Modified: brlcad/trunk/src/librt/primitives/bot/g_bot_include.c
===================================================================
--- brlcad/trunk/src/librt/primitives/bot/g_bot_include.c       2016-10-17 
14:16:49 UTC (rev 69099)
+++ brlcad/trunk/src/librt/primitives/bot/g_bot_include.c       2016-10-17 
14:23:02 UTC (rev 69100)
@@ -328,7 +328,7 @@
     }
 
     /* zero thickness will get missed by the raytracer */
-    BBOX_NONDEGEN(stp->st_min, stp->st_max, los)
+    BBOX_NONDEGEN(stp->st_min, stp->st_max, los);
 
     VADD2SCALE(stp->st_center, stp->st_max, stp->st_min, 0.5);
 

Modified: brlcad/trunk/src/librt/primitives/bspline/bspline.cpp
===================================================================
--- brlcad/trunk/src/librt/primitives/bspline/bspline.cpp       2016-10-17 
14:16:49 UTC (rev 69099)
+++ brlcad/trunk/src/librt/primitives/bspline/bspline.cpp       2016-10-17 
14:23:02 UTC (rev 69100)
@@ -158,18 +158,7 @@
        nurbs = n;
     }
     /* zero thickness will get missed by the raytracer */
-    if (NEAR_EQUAL((*min)[X], (*max)[X], SMALL_FASTF)) {
-       (*min)[X] -= SMALL_FASTF;
-       (*max)[X] += SMALL_FASTF;
-    }
-    if (NEAR_EQUAL((*min)[Y], (*max)[Y], SMALL_FASTF)) {
-       (*min)[Y] -= SMALL_FASTF;
-       (*max)[Y] += SMALL_FASTF;
-    }
-    if (NEAR_EQUAL((*min)[Z], (*max)[Z], SMALL_FASTF)) {
-       (*min)[Z] -= SMALL_FASTF;
-       (*max)[Z] += SMALL_FASTF;
-    }
+    BBOX_NONDEGEN((*min), (*max), SMALL_FASTF);
 
     for (; nurbs != (struct nurb_specific *)0; nurbs = next) {
        register struct face_g_snurb *s;
@@ -260,7 +249,7 @@
     stp->st_specific = (void *)nurbs;
 
     /* zero thickness will get missed by the raytracer */
-    BBOX_NONDEGEN(stp->st_min, stp->st_max, los)
+    BBOX_NONDEGEN(stp->st_min, stp->st_max, los);
 
     VADD2SCALE(stp->st_center, stp->st_max, stp->st_min, 0.5);
     {

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to