[geos-commits] r3981 - in trunk: . src/algorithm src/geom src/io src/operation/buffer
svn_geos at osgeo.org
svn_geos at osgeo.org
Wed May 7 10:32:22 PDT 2014
Author: mloskot
Date: 2014-05-07 10:32:22 -0700 (Wed, 07 May 2014)
New Revision: 3981
Modified:
trunk/nmake.opt
trunk/src/algorithm/LineIntersector.cpp
trunk/src/geom/LineSegment.cpp
trunk/src/io/WKTWriter.cpp
trunk/src/operation/buffer/OffsetCurveSetBuilder.cpp
Log:
Apply minimal changes to enable building with Visual Studio 2013 (Ticket #691)
Modified: trunk/nmake.opt
===================================================================
--- trunk/nmake.opt 2014-03-29 10:44:53 UTC (rev 3980)
+++ trunk/nmake.opt 2014-05-07 17:32:22 UTC (rev 3981)
@@ -123,6 +123,9 @@
!ELSEIF "$(_NMAKE_VER)" == "11.00.61030.0"
GEOS_MSVC = 11.0
GEOS_MSC = 1700
+!ELSEIF "$(_NMAKE_VER)" == "12.00.21005.1"
+GEOS_MSVC = 12.0
+GEOS_MSC = 1800
!ELSE
GEOS_MSVC = 0.0
GEOS_MSC = 0
Modified: trunk/src/algorithm/LineIntersector.cpp
===================================================================
--- trunk/src/algorithm/LineIntersector.cpp 2014-03-29 10:44:53 UTC (rev 3980)
+++ trunk/src/algorithm/LineIntersector.cpp 2014-05-07 17:32:22 UTC (rev 3981)
@@ -29,6 +29,7 @@
//#include <geos/util/Assert.h> // changed to TopologyException
//#include <geos/util/TopologyException.h> // we don't throw anymore
+#include <algorithm> // for max()
#include <string>
#include <cmath> // for fabs()
#include <cassert>
@@ -125,7 +126,7 @@
// <FIX>
// hack to ensure that non-endpoints always have a non-zero distance
if (dist == 0.0 && !(p==p0)) {
- dist=max(pdx,pdy);
+ dist=(std::max)(pdx,pdy);
}
}
assert(!(dist == 0.0 && !(p==p0))); // Bad distance calculation
Modified: trunk/src/geom/LineSegment.cpp
===================================================================
--- trunk/src/geom/LineSegment.cpp 2014-03-29 10:44:53 UTC (rev 3980)
+++ trunk/src/geom/LineSegment.cpp 2014-05-07 17:32:22 UTC (rev 3981)
@@ -32,6 +32,7 @@
#include <geos/profiler.h>
#include <geos/inline.h>
+#include <algorithm> // for max
#include <sstream>
#include <cmath>
@@ -168,10 +169,10 @@
int orient1 = algorithm::CGAlgorithms::orientationIndex(p0, p1, seg.p1);
// this handles the case where the points are L or collinear
if (orient0 >= 0 && orient1 >= 0)
- return max(orient0, orient1);
+ return (std::max)(orient0, orient1);
// this handles the case where the points are R or collinear
if (orient0 <= 0 && orient1 <= 0)
- return max(orient0, orient1);
+ return (std::max)(orient0, orient1);
// points lie on opposite sides ==> indeterminate orientation
return 0;
}
Modified: trunk/src/io/WKTWriter.cpp
===================================================================
--- trunk/src/io/WKTWriter.cpp 2014-03-29 10:44:53 UTC (rev 3980)
+++ trunk/src/io/WKTWriter.cpp 2014-05-07 17:32:22 UTC (rev 3981)
@@ -33,6 +33,7 @@
#include <geos/geom/PrecisionModel.h>
#include <geos/util/IllegalArgumentException.h>
+#include <algorithm> // for min
#include <typeinfo>
#include <cstdio> // should avoid this
#include <string>
@@ -179,7 +180,7 @@
WKTWriter::appendGeometryTaggedText(const Geometry *geometry, int level,
Writer *writer)
{
- outputDimension = min( defaultOutputDimension,
+ outputDimension = (std::min)( defaultOutputDimension,
geometry->getCoordinateDimension() );
indent(level, writer);
Modified: trunk/src/operation/buffer/OffsetCurveSetBuilder.cpp
===================================================================
--- trunk/src/operation/buffer/OffsetCurveSetBuilder.cpp 2014-03-29 10:44:53 UTC (rev 3980)
+++ trunk/src/operation/buffer/OffsetCurveSetBuilder.cpp 2014-05-07 17:32:22 UTC (rev 3981)
@@ -37,6 +37,7 @@
#include <geos/geomgraph/Label.h>
#include <geos/noding/NodedSegmentString.h>
+#include <algorithm> // for min
#include <cmath>
#include <cassert>
#include <memory>
More information about the geos-commits
mailing list