[QGIS Commit] r8141 - trunk/qgis/src/core

svn_qgis at osgeo.org svn_qgis at osgeo.org
Tue Feb 12 11:44:14 EST 2008


Author: timlinux
Date: 2008-02-12 11:44:14 -0500 (Tue, 12 Feb 2008)
New Revision: 8141

Modified:
   trunk/qgis/src/core/qgspoint.cpp
   trunk/qgis/src/core/qgspoint.h
Log:
Dont call method 'max' because its a reserved word / compiler macro on some platforms (MSVC) and causes build failures


Modified: trunk/qgis/src/core/qgspoint.cpp
===================================================================
--- trunk/qgis/src/core/qgspoint.cpp	2008-02-12 01:49:05 UTC (rev 8140)
+++ trunk/qgis/src/core/qgspoint.cpp	2008-02-12 16:44:14 UTC (rev 8141)
@@ -99,7 +99,7 @@
   //algorithm from 'graphics GEMS', A. Paeth: 'A Fast 2D Point-on-line test'
   if(
      fabs( (b.y() - a.y()) * (m_x - a.x()) - (m_y - a.y()) * (b.x() - a.x())) \
-     >= max( fabs(b.x() - a.x()), fabs(b.y() - a.y()))
+     >= maxValue( fabs(b.x() - a.x()), fabs(b.y() - a.y()))
      )
     {
       return 0;
@@ -124,7 +124,7 @@
   return 2;
 }
 
-double QgsPoint::max(double a, double b) const
+double QgsPoint::maxValue(double a, double b) const
 {
   if(b > a)
     {

Modified: trunk/qgis/src/core/qgspoint.h
===================================================================
--- trunk/qgis/src/core/qgspoint.h	2008-02-12 01:49:05 UTC (rev 8140)
+++ trunk/qgis/src/core/qgspoint.h	2008-02-12 16:44:14 UTC (rev 8141)
@@ -129,7 +129,7 @@
 
     //! little helper function that returns the maximum of 
     //! two doubles (or a in case of equality)
-    double max(double a, double b) const;
+    double maxValue(double a, double b) const;
     
 }; // class QgsPOint
 



More information about the QGIS-commit mailing list