[geos-commits] r3561 - trunk/src/operation/buffer

svn_geos at osgeo.org svn_geos at osgeo.org
Fri Jan 6 16:53:35 EST 2012


Author: strk
Date: 2012-01-06 13:53:35 -0800 (Fri, 06 Jan 2012)
New Revision: 3561

Modified:
   trunk/src/operation/buffer/BufferOp.cpp
Log:
Forward port: Fix MSVC compilation of ambiguous log() call #506

Modified: trunk/src/operation/buffer/BufferOp.cpp
===================================================================
--- trunk/src/operation/buffer/BufferOp.cpp	2012-01-06 21:50:23 UTC (rev 3560)
+++ trunk/src/operation/buffer/BufferOp.cpp	2012-01-06 21:53:35 UTC (rev 3561)
@@ -93,7 +93,7 @@
   double bufEnvMax = envMax + 2 * expandByDistance;
 
   // the smallest power of 10 greater than the buffer envelope
-  int bufEnvPrecisionDigits = (int) (std::log(bufEnvMax) / std::log(10) + 1.0);
+  int bufEnvPrecisionDigits = (int) (std::log(bufEnvMax) / std::log(10.0) + 1.0);
   int minUnitLog10 = maxPrecisionDigits - bufEnvPrecisionDigits;
 
   double scaleFactor = std::pow(10.0, minUnitLog10);



More information about the geos-commits mailing list