Revision: 41363
          http://brlcad.svn.sourceforge.net/brlcad/?rev=41363&view=rev
Author:   brlcad
Date:     2010-11-15 22:17:24 +0000 (Mon, 15 Nov 2010)

Log Message:
-----------
check args to quell warnings, perform NEAR_ZERO test instead of exactly testing 
for == 0 on a double.

Modified Paths:
--------------
    brlcad/trunk/src/libged/solids_on_ray.c

Modified: brlcad/trunk/src/libged/solids_on_ray.c
===================================================================
--- brlcad/trunk/src/libged/solids_on_ray.c     2010-11-15 22:13:15 UTC (rev 
41362)
+++ brlcad/trunk/src/libged/solids_on_ray.c     2010-11-15 22:17:24 UTC (rev 
41363)
@@ -48,6 +48,12 @@
 static int
 ged_no_op(struct application *ap, struct partition *ph, struct region *r1, 
struct region *r2, struct partition *hp)
 {
+    if (ap) RT_CK_APPLICATION(ap);
+    if (ph) RT_CK_PARTITION(ph);
+    if (r1) RT_CK_REGION(r1);
+    if (r2) RT_CK_REGION(r2);
+    if (hp) RT_CK_PARTITION(hp);
+
     return 1;
 }
 
@@ -71,6 +77,8 @@
     char **list;
     int i;
 
+    if (segp) RT_CK_SEG(segp);
+
     len = rt_partition_len(PartHeadp) + 2;
     list = (char **)bu_calloc(len, sizeof(char *), "hit list[]");
 
@@ -122,7 +130,7 @@
  * of solid names.
  */
 static char **
-ged_skewer_solids (struct ged *gedp, int argc, const char **argv, fastf_t 
*ray_orig, fastf_t *ray_dir, int full_path)
+ged_skewer_solids (struct ged *gedp, int argc, const char **argv, fastf_t 
*ray_orig, fastf_t *ray_dir, int UNUSED(full_path))
 {
     struct application ap;
     struct rt_i *rtip;
@@ -254,7 +262,7 @@
     {
        t_in = -INFINITY;
        for (i = 0; i < 6; ++i) {
-           if (ray_dir[i%3] == 0)
+           if (NEAR_ZERO(ray_dir[i%3], SMALL_FASTF))
                continue;
            t = (extremum[i/3][i%3] - ray_orig[i%3]) /
                ray_dir[i%3];


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

------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to