Revision: 56653
          http://sourceforge.net/p/brlcad/code/56653
Author:   starseeker
Date:     2013-08-07 00:57:30 +0000 (Wed, 07 Aug 2013)
Log Message:
-----------
Add a local wrapper around the test logic that lets us explicitly test strict 
weak ordering.

Modified Paths:
--------------
    brlcad/trunk/src/other/libgdiam/gdiam.cpp

Modified: brlcad/trunk/src/other/libgdiam/gdiam.cpp
===================================================================
--- brlcad/trunk/src/other/libgdiam/gdiam.cpp   2013-08-07 00:43:24 UTC (rev 
56652)
+++ brlcad/trunk/src/other/libgdiam/gdiam.cpp   2013-08-07 00:57:30 UTC (rev 
56653)
@@ -1412,7 +1412,8 @@
 public:    
     point2d  base;
 
-    bool operator()(const point2d_ptr  & a, const point2d_ptr   & b ) {
+
+    bool local_compare(const point2d_ptr  & a, const point2d_ptr   & b ) {
        int  sgn;
        gdiam_real  len1, len2;
 
@@ -1445,6 +1446,14 @@
 
         return (len1 > len2);
     }
+    bool operator()(const point2d_ptr  & a, const point2d_ptr   & b ) {
+           /*printf("comparing: %f,%f and %f,%f\n", a->x, a->y, b->x, b->y);*/
+           if (!local_compare(a,b))
+                   return (false);
+           else if (this->local_compare(b,a))
+                   printf("Problem - strick weak ordering failure!\n");
+           return (true);
+    }
 };
 
 

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


------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to