[mapguide-commits] r6579 - branches/2.4/MgDev/Common/CoordinateSystem

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Thu Apr 19 12:09:38 EDT 2012


Author: jng
Date: 2012-04-19 09:09:38 -0700 (Thu, 19 Apr 2012)
New Revision: 6579

Modified:
   branches/2.4/MgDev/Common/CoordinateSystem/CoordSysTransform.cpp
Log:
Linux build fix: GCC 4.1 throws undefined reference to TransformTotalFailure and TransformDatumShiftWarning when used in a ternary expression. This submission changes such expressions to if/else.

Modified: branches/2.4/MgDev/Common/CoordinateSystem/CoordSysTransform.cpp
===================================================================
--- branches/2.4/MgDev/Common/CoordinateSystem/CoordSysTransform.cpp	2012-04-19 16:07:52 UTC (rev 6578)
+++ branches/2.4/MgDev/Common/CoordinateSystem/CoordSysTransform.cpp	2012-04-19 16:09:38 UTC (rev 6579)
@@ -2160,7 +2160,12 @@
         }
         if (dtmStatus != 0)
         {
-            status = (dtmStatus < 0) ? TransformTotalFailure : TransformDatumShiftWarning;
+            //NOTE: Ternary expressions will trigger "undefined reference" to these 2 constants
+            //For GCC 4.1 and older
+            if (dtmStatus < 0)
+                status = TransformTotalFailure;
+            else
+                status = TransformDatumShiftWarning;
             ++m_nDatumCount;
         }
     }
@@ -2198,7 +2203,12 @@
         }
         if (dtmStatus != 0)
         {
-            status = (dtmStatus < 0) ? TransformTotalFailure : TransformDatumShiftWarning;
+            //NOTE: Ternary expressions will trigger "undefined reference" to these 2 constants
+            //For GCC 4.1 and older
+            if (dtmStatus < 0)
+                status = TransformTotalFailure;
+            else
+                status = TransformDatumShiftWarning;
             ++m_nDatumCount;
         }
     }



More information about the mapguide-commits mailing list