[geos-commits] r2685 - in trunk/source: headers/geos/index/strtree
index/strtree
svn_geos at osgeo.org
svn_geos at osgeo.org
Tue Oct 20 12:59:33 EDT 2009
Author: strk
Date: 2009-10-20 12:59:30 -0400 (Tue, 20 Oct 2009)
New Revision: 2685
Modified:
trunk/source/headers/geos/index/strtree/AbstractSTRtree.h
trunk/source/index/strtree/STRtree.cpp
Log:
Commit MingW bug workaround provided by sanak in ticket #293
Modified: trunk/source/headers/geos/index/strtree/AbstractSTRtree.h
===================================================================
--- trunk/source/headers/geos/index/strtree/AbstractSTRtree.h 2009-10-19 13:38:36 UTC (rev 2684)
+++ trunk/source/headers/geos/index/strtree/AbstractSTRtree.h 2009-10-20 16:59:30 UTC (rev 2685)
@@ -259,7 +259,11 @@
}
static bool compareDoubles(double a, double b) {
- return a<b;
+ // NOTE - strk:
+ // Ternary operation is a workaround for
+ // a probable MingW bug, see
+ // http://trac.osgeo.org/geos/ticket/293
+ return ( a < b ) ? true : false;
}
virtual ~AbstractSTRtree();
Modified: trunk/source/index/strtree/STRtree.cpp
===================================================================
--- trunk/source/index/strtree/STRtree.cpp 2009-10-19 13:38:36 UTC (rev 2684)
+++ trunk/source/index/strtree/STRtree.cpp 2009-10-20 16:59:30 UTC (rev 2685)
@@ -80,7 +80,12 @@
const wchar_t *_Where, unsigned int _Line)*/
//return std::fabs( STRtree::centreY(aEnv) - STRtree::centreY(bEnv) ) < 1e-30
- return STRtree::centreY(aEnv) < STRtree::centreY(bEnv);
+
+ // NOTE - strk:
+ // See http://trac.osgeo.org/geos/ticket/293
+ // as for why simple comparison (<) isn't used here
+ return AbstractSTRtree::compareDoubles(STRtree::centreY(aEnv),
+ STRtree::centreY(bEnv));
}
/*public*/
More information about the geos-commits
mailing list