[mapguide-commits] r4393 - trunk/MgDev/Common/CoordinateSystem

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Tue Dec 8 19:33:53 EST 2009


Author: NormOlsen
Date: 2009-12-08 19:33:52 -0500 (Tue, 08 Dec 2009)
New Revision: 4393

Modified:
   trunk/MgDev/Common/CoordinateSystem/CoordSysMgrs.cpp
   trunk/MgDev/Common/CoordinateSystem/CoordSysMgrsZone.cpp
Log:
Another submission for RFC 76, Trac ticket 1177.

Found two glitches in the memory exception detection code.  The integer overflow detection mechanism was detecting everything as overflow; the hexadecimal constants were one digit shy of what was intended.

Modified: trunk/MgDev/Common/CoordinateSystem/CoordSysMgrs.cpp
===================================================================
--- trunk/MgDev/Common/CoordinateSystem/CoordSysMgrs.cpp	2009-12-09 00:27:49 UTC (rev 4392)
+++ trunk/MgDev/Common/CoordinateSystem/CoordSysMgrs.cpp	2009-12-09 00:33:52 UTC (rev 4393)
@@ -579,7 +579,7 @@
         {
             Ptr<CCoordinateSystemMgrsZone> mgrsZoneGrid = m_ZoneCollection->GetItem (index);
             memoryUse = mgrsZoneGrid->ApproxGridRegionMemoryUsage (specification);
-            maxValue = 0x7FFF000 - memoryGuess;
+            maxValue = 0x7FFF0000 - memoryGuess;
             if (memoryUse < maxValue)
             {
                 memoryGuess += memoryUse;

Modified: trunk/MgDev/Common/CoordinateSystem/CoordSysMgrsZone.cpp
===================================================================
--- trunk/MgDev/Common/CoordinateSystem/CoordSysMgrsZone.cpp	2009-12-09 00:27:49 UTC (rev 4392)
+++ trunk/MgDev/Common/CoordinateSystem/CoordSysMgrsZone.cpp	2009-12-09 00:33:52 UTC (rev 4393)
@@ -264,7 +264,7 @@
                                                             sizeof (MgLineString) * 4 +
                                                             kMgSizeOfCoordinateXY * 4088;
     }
-    maxRegions = 0x7FFF000 / regionSize;
+    maxRegions = 0x7FFF0000 / regionSize;
 
     MG_TRY ()
         if (specification->GetUnitType () == MgCoordinateSystemUnitType::Angular)



More information about the mapguide-commits mailing list