[mapguide-commits] r5487 - in trunk/MgDev/Common: CoordinateSystem Foundation/System Geometry Geometry/Buffer MapGuideCommon/Controller MapGuideCommon/MapLayer MapGuideCommon/Services MdfParser PlatformBase/Data PlatformBase/MapLayer Renderers Stylization

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Wed Dec 29 01:32:51 EST 2010


Author: waltweltonlair
Date: 2010-12-28 22:32:51 -0800 (Tue, 28 Dec 2010)
New Revision: 5487

Modified:
   trunk/MgDev/Common/CoordinateSystem/CoordSys.cpp
   trunk/MgDev/Common/CoordinateSystem/CoordSysCatalog.cpp
   trunk/MgDev/Common/CoordinateSystem/CoordSysCategory.cpp
   trunk/MgDev/Common/CoordinateSystem/CoordSysCategoryDictionary.cpp
   trunk/MgDev/Common/CoordinateSystem/CoordSysDatumDictionary.cpp
   trunk/MgDev/Common/CoordinateSystem/CoordSysDictionary.cpp
   trunk/MgDev/Common/CoordinateSystem/CoordSysEllipsoidDictionary.cpp
   trunk/MgDev/Common/CoordinateSystem/CoordSysEnum.cpp
   trunk/MgDev/Common/CoordinateSystem/CoordSysEnumCategory.cpp
   trunk/MgDev/Common/CoordinateSystem/CoordSysEnumCoordinateSystemInCategory.cpp
   trunk/MgDev/Common/CoordinateSystem/CoordSysGrids.cpp
   trunk/MgDev/Common/CoordinateSystem/CoordSysMgrs.cpp
   trunk/MgDev/Common/CoordinateSystem/CoordSysTransform.cpp
   trunk/MgDev/Common/Foundation/System/Configuration.cpp
   trunk/MgDev/Common/Foundation/System/Resources.cpp
   trunk/MgDev/Common/Foundation/System/StreamData.cpp
   trunk/MgDev/Common/Foundation/System/StreamReader.cpp
   trunk/MgDev/Common/Geometry/Buffer/DumpFFGF.cpp
   trunk/MgDev/Common/Geometry/Buffer/planeswp.cpp
   trunk/MgDev/Common/Geometry/MultiCurveString.cpp
   trunk/MgDev/Common/Geometry/MultiLineString.cpp
   trunk/MgDev/Common/MapGuideCommon/Controller/DwfController.cpp
   trunk/MgDev/Common/MapGuideCommon/MapLayer/Layer.cpp
   trunk/MgDev/Common/MapGuideCommon/MapLayer/Map.cpp
   trunk/MgDev/Common/MapGuideCommon/Services/ConnectionProperties.cpp
   trunk/MgDev/Common/MapGuideCommon/Services/PrintLayout.cpp
   trunk/MgDev/Common/MapGuideCommon/Services/ProxyDataReader.cpp
   trunk/MgDev/Common/MapGuideCommon/Services/ProxyFeatureReader.cpp
   trunk/MgDev/Common/MapGuideCommon/Services/ProxyFeatureTransaction.cpp
   trunk/MgDev/Common/MapGuideCommon/Services/ProxyGwsFeatureReader.cpp
   trunk/MgDev/Common/MapGuideCommon/Services/ProxySqlDataReader.cpp
   trunk/MgDev/Common/MapGuideCommon/Services/ServerConnection.cpp
   trunk/MgDev/Common/MapGuideCommon/Services/ServerConnectionPool.cpp
   trunk/MgDev/Common/MapGuideCommon/Services/ServerConnectionStack.cpp
   trunk/MgDev/Common/MapGuideCommon/Services/Site.cpp
   trunk/MgDev/Common/MapGuideCommon/Services/SiteManager.cpp
   trunk/MgDev/Common/MapGuideCommon/Services/SqlResult.cpp
   trunk/MgDev/Common/MdfParser/SAX2ElementHandler.h
   trunk/MgDev/Common/PlatformBase/Data/DateTimeProperty.cpp
   trunk/MgDev/Common/PlatformBase/MapLayer/MapBase.cpp
   trunk/MgDev/Common/PlatformBase/MapLayer/SelectionBase.cpp
   trunk/MgDev/Common/Renderers/AGGImageIO.cpp
   trunk/MgDev/Common/Renderers/AGGRenderer.cpp
   trunk/MgDev/Common/Renderers/AGGRenderer.h
   trunk/MgDev/Common/Renderers/DWFRenderer.cpp
   trunk/MgDev/Common/Renderers/EMapRenderer.cpp
   trunk/MgDev/Common/Renderers/EMapUpdateRenderer.cpp
   trunk/MgDev/Common/Renderers/EPlotRenderer.cpp
   trunk/MgDev/Common/Renderers/FontManager.cpp
   trunk/MgDev/Common/Renderers/KmlRenderer.cpp
   trunk/MgDev/Common/Renderers/ObservationMesh.cpp
   trunk/MgDev/Common/Stylization/Band.cpp
   trunk/MgDev/Common/Stylization/DefaultStylizer.cpp
   trunk/MgDev/Common/Stylization/GeometryAdapter.cpp
   trunk/MgDev/Common/Stylization/LabelRenderer.h
   trunk/MgDev/Common/Stylization/LabelRendererLocal.h
   trunk/MgDev/Common/Stylization/LineStyleDef.cpp
   trunk/MgDev/Common/Stylization/PointAdapter.cpp
   trunk/MgDev/Common/Stylization/PolygonAdapter.cpp
   trunk/MgDev/Common/Stylization/PolygonUtils.cpp
   trunk/MgDev/Common/Stylization/PolylineAdapter.cpp
   trunk/MgDev/Common/Stylization/SE_PositioningAlgorithms.cpp
   trunk/MgDev/Common/Stylization/SE_RenderProxies.h
   trunk/MgDev/Common/Stylization/SE_SymbolDefProxies.cpp
   trunk/MgDev/Common/Stylization/SE_SymbolDefProxies.h
   trunk/MgDev/Common/Stylization/StylizationEngine.cpp
   trunk/MgDev/Common/Stylization/StylizationUtil.cpp
Log:
I ran cppcheck (http://en.wikipedia.org/wiki/Cppcheck) against the MapGuide source code
(for now just the Common folder) and addressed some of the issues it pointed out:
- removed unused variables
- better initialization of some variables
- fixed a few memory leaks
- using prefix ++/-- operators for non-primitive types


Modified: trunk/MgDev/Common/CoordinateSystem/CoordSys.cpp
===================================================================
--- trunk/MgDev/Common/CoordinateSystem/CoordSys.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/CoordinateSystem/CoordSys.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -737,7 +737,7 @@
     assert(nNumErrs > 0);
 
     //Make an array of integers to hold the error codes.
-    int *pErrs = new int[nNumErrs];
+    pErrs = new int[nNumErrs];
     if (NULL == pErrs)
     {
         throw new MgOutOfMemoryException(L"MgCoordinateSystem.GetErrors", __LINE__, __WFILE__, NULL, L"", NULL);
@@ -3264,12 +3264,8 @@
         throw new MgCoordinateSystemInitializationFailedException(L"MgCoordinateSystem.ConvertPoint", __LINE__, __WFILE__, NULL, L"MgCoordinateSystemNotReadyException", NULL);
     }
 
-    //If range checking is turned on, find out whether
-    //we'll need to warn the caller later on.
-    bool bWarn = false;
-    int nResult;
-
     //Do the conversion.
+    int nResult;
     double dCoords[3] = { dSourceCoord1, dSourceCoord2, dSourceCoord3 };
     CriticalClass.Enter();
     nResult = convert(&m_csprm, dCoords, dCoords);

Modified: trunk/MgDev/Common/CoordinateSystem/CoordSysCatalog.cpp
===================================================================
--- trunk/MgDev/Common/CoordinateSystem/CoordSysCatalog.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/CoordinateSystem/CoordSysCatalog.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -303,7 +303,6 @@
     wchar_t szFname[_MAX_FNAME] = {0};
     wchar_t szExt[_MAX_EXT] = {0};
     _tsplitpath(sDirPath.c_str(), szDrive, szDir, szFname, szExt);
-    wchar_t* pNewDir=NULL;
     if ((_tcslen(szFname) > 0) || (_tcslen(szExt) > 0))
     {
         //ABA: don't understand: if a filename or an extension has been found,

Modified: trunk/MgDev/Common/CoordinateSystem/CoordSysCategory.cpp
===================================================================
--- trunk/MgDev/Common/CoordinateSystem/CoordSysCategory.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/CoordinateSystem/CoordSysCategory.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -112,7 +112,7 @@
 
     //Coordinate system names.
     CSystemNameList::const_iterator iter;
-    for (iter=m_listCoordinateSystemNames.begin(); iter!=m_listCoordinateSystemNames.end(); iter++)
+    for (iter=m_listCoordinateSystemNames.begin(); iter!=m_listCoordinateSystemNames.end(); ++iter)
     {
         CS_fwrite((*iter).Name(), sizeof(char), cs_KEYNM_DEF, pFile);
     }
@@ -559,7 +559,7 @@
     }
 
     CSystemNameList::const_iterator iter;
-    for (iter=m_listCoordinateSystemNames.begin(); iter!=m_listCoordinateSystemNames.end(); iter++)
+    for (iter=m_listCoordinateSystemNames.begin(); iter!=m_listCoordinateSystemNames.end(); ++iter)
     {
         wchar_t *pName = Convert_Ascii_To_Wide((*iter).Name());    //need to delete [] pName
         if (NULL == pName)

Modified: trunk/MgDev/Common/CoordinateSystem/CoordSysCategoryDictionary.cpp
===================================================================
--- trunk/MgDev/Common/CoordinateSystem/CoordSysCategoryDictionary.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/CoordinateSystem/CoordSysCategoryDictionary.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -200,7 +200,6 @@
     CriticalClass.Enter();
     MG_TRY()
     assert(NULL != kpDefName);
-    bool bReplace = (NULL != pDef);
     STRING tempName;
     STRING strPath=GetPath();
 
@@ -246,7 +245,6 @@
     CCoordinateSystemCategory curDef(m_pCatalog);
     CCoordinateSystemCategory *pDefToWrite;
     bool bFound = false;
-    bool bEndOfFileReached=false;
     while (!feof(pFile))
     {
         //Get def from original file
@@ -863,7 +861,7 @@
         throw new MgOutOfMemoryException(L"MgCoordinateSystemCategoryDictionary.Rename", __LINE__, __WFILE__, NULL, L"", NULL);
     }
     CCategoryNameList::iterator iterList;
-    for (iterList = List().begin(); iterList != List().end(); iterList++)
+    for (iterList = List().begin(); iterList != List().end(); ++iterList)
     {
         if (oldCategory == *iterList)
         {

Modified: trunk/MgDev/Common/CoordinateSystem/CoordSysDatumDictionary.cpp
===================================================================
--- trunk/MgDev/Common/CoordinateSystem/CoordSysDatumDictionary.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/CoordinateSystem/CoordSysDatumDictionary.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -267,6 +267,7 @@
     csFILE *pFile=CS_fopen(kpName, szMode);
     if (!pFile)
     {
+        delete [] pBuf;
         return NULL;
     }
     int nResult = CS_bins(

Modified: trunk/MgDev/Common/CoordinateSystem/CoordSysDictionary.cpp
===================================================================
--- trunk/MgDev/Common/CoordinateSystem/CoordSysDictionary.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/CoordinateSystem/CoordSysDictionary.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -267,6 +267,7 @@
     csFILE *pFile=CS_fopen(kpName, szMode);
     if (!pFile)
     {
+        delete [] pBuf;
         return NULL;
     }
     int nResult = CS_bins(

Modified: trunk/MgDev/Common/CoordinateSystem/CoordSysEllipsoidDictionary.cpp
===================================================================
--- trunk/MgDev/Common/CoordinateSystem/CoordSysEllipsoidDictionary.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/CoordinateSystem/CoordSysEllipsoidDictionary.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -207,6 +207,7 @@
     csFILE *pFile=CS_fopen(kpName, szMode);
     if (!pFile)
     {
+        delete [] pBuf;
         return NULL;
     }
     int nResult = CS_bins(

Modified: trunk/MgDev/Common/CoordinateSystem/CoordSysEnum.cpp
===================================================================
--- trunk/MgDev/Common/CoordinateSystem/CoordSysEnum.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/CoordinateSystem/CoordSysEnum.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -125,7 +125,7 @@
     }
 
     //default behavior - read each entry one by one and add it to the list to be returned
-    for (; m_iter != m_pmapSystemNameDescription->end(); m_iter++)
+    for (; m_iter != m_pmapSystemNameDescription->end(); ++m_iter)
     {
         if (pOutput->GetCount() == ulCount)
         {
@@ -175,7 +175,7 @@
     {
         throw new MgOutOfMemoryException(L"MgCoordinateSystemEnum.NextName", __LINE__, __WFILE__, NULL, L"", NULL);
     }
-    for (; m_iter != m_pmapSystemNameDescription->end(); m_iter++)
+    for (; m_iter != m_pmapSystemNameDescription->end(); ++m_iter)
     {
         if (pOutput->GetCount() == ulCount)
         {
@@ -210,7 +210,7 @@
     {
         throw new MgOutOfMemoryException(L"MgCoordinateSystemEnum.NextDescription", __LINE__, __WFILE__, NULL, L"", NULL);
     }
-    for (; m_iter != m_pmapSystemNameDescription->end(); m_iter++)
+    for (; m_iter != m_pmapSystemNameDescription->end(); ++m_iter)
     {
         if (pOutput->GetCount() == ulCount)
         {
@@ -244,7 +244,7 @@
     MG_TRY()
 
     UINT32 ulSkipped;
-    for (ulSkipped=0; m_iter != m_pmapSystemNameDescription->end(); m_iter++)
+    for (ulSkipped=0; m_iter != m_pmapSystemNameDescription->end(); ++m_iter)
     {
         if (ulSkipped == ulSkipCount)
         {

Modified: trunk/MgDev/Common/CoordinateSystem/CoordSysEnumCategory.cpp
===================================================================
--- trunk/MgDev/Common/CoordinateSystem/CoordSysEnumCategory.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/CoordinateSystem/CoordSysEnumCategory.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -167,7 +167,7 @@
 
     wchar_t* pStr;
 
-    for (; m_iter != m_pCategoryNameList->end();     m_iter++)
+    for (; m_iter != m_pCategoryNameList->end(); ++m_iter)
     {
         if (pOutput->GetCount() == ulCount)
         {
@@ -221,7 +221,7 @@
         throw new MgOutOfMemoryException(L"MgCoordinateSystemEnum.NextName", __LINE__, __WFILE__, NULL, L"", NULL);
     }
 
-    for (; m_iter != m_pCategoryNameList->end(); m_iter++)
+    for (; m_iter != m_pCategoryNameList->end(); ++m_iter)
     {
         if (pOutput->GetCount() == ulCount)
         {
@@ -263,7 +263,7 @@
     MG_TRY()
 
     UINT32 ulSkipped;
-    for (ulSkipped=0; m_iter != m_pCategoryNameList->end(); m_iter++)
+    for (ulSkipped=0; m_iter != m_pCategoryNameList->end(); ++m_iter)
     {
         if (ulSkipped == ulSkipCount)
         {

Modified: trunk/MgDev/Common/CoordinateSystem/CoordSysEnumCoordinateSystemInCategory.cpp
===================================================================
--- trunk/MgDev/Common/CoordinateSystem/CoordSysEnumCoordinateSystemInCategory.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/CoordinateSystem/CoordSysEnumCoordinateSystemInCategory.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -102,7 +102,7 @@
     }
 
     wchar_t* pstr;
-    for (; m_iter != m_kpListCoordinateSystemNames->end(); m_iter++)
+    for (; m_iter != m_kpListCoordinateSystemNames->end(); ++m_iter)
     {
         if (pOutput->GetCount() == ulCount)
         {
@@ -156,7 +156,7 @@
         throw new MgOutOfMemoryException(L"MgCoordinateSystemEnum.NextName", __LINE__, __WFILE__, NULL, L"", NULL);
     }
     wchar_t* pstr;
-    for (; m_iter != m_kpListCoordinateSystemNames->end(); m_iter++)
+    for (; m_iter != m_kpListCoordinateSystemNames->end(); ++m_iter)
     {
         if (pOutput->GetCount() == ulCount)
         {
@@ -205,7 +205,7 @@
     }
 
     wchar_t* pstr;
-    for (; m_iter != m_kpListCoordinateSystemNames->end(); m_iter++)
+    for (; m_iter != m_kpListCoordinateSystemNames->end(); ++m_iter)
     {
         if (pOutput->GetCount() == ulCount)
         {
@@ -256,7 +256,7 @@
 {
     MG_TRY()
     UINT32 ulSkipped;
-    for (ulSkipped=0; m_iter != m_kpListCoordinateSystemNames->end(); m_iter++)
+    for (ulSkipped=0; m_iter != m_kpListCoordinateSystemNames->end(); ++m_iter)
     {
         if (ulSkipped == ulSkipCount)
         {
@@ -309,7 +309,7 @@
     {
         throw new MgOutOfMemoryException(L"MgCoordinateSystemEnum.IsFilteredOut", __LINE__, __WFILE__, NULL, L"", NULL);
     }
-    bool bIsFiltered=IsFilteredOut(pStr);
+    bIsFiltered=IsFilteredOut(pStr);
     delete[] pStr;
     MG_CATCH_AND_THROW(L"MgCoordinateSystemEnum.IsFilteredOut")
     return bIsFiltered;

Modified: trunk/MgDev/Common/CoordinateSystem/CoordSysGrids.cpp
===================================================================
--- trunk/MgDev/Common/CoordinateSystem/CoordSysGrids.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/CoordinateSystem/CoordSysGrids.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -247,8 +247,6 @@
 {
     double precisionInCsUnits (1.0);
     double precisionInMeters (1.0);
-    double toMeters;
-    double toDegrees;
 
     Ptr<MgCoordinateSystemCatalog> catalogPtr = gridCS->GetCatalog ();
     Ptr<MgCoordinateSystemUnitInformation> unitInfoPtr = catalogPtr->GetUnitInformation ();
@@ -265,13 +263,14 @@
     }
     else
     {
+        double toMeters;
         if (m_UnitType == MgCoordinateSystemUnitType::Linear)
         {
             toMeters = unitInfoPtr->GetLinearUnitScale (m_UnitCode);
         }
         else
         {
-            toDegrees = unitInfoPtr->GetAngularUnitScale (m_UnitCode);
+            double toDegrees = unitInfoPtr->GetAngularUnitScale (m_UnitCode);
             toMeters = (6378137.0 * M_PI * 2.0 / 360.0) / toDegrees;
         }
         precisionInMeters = m_CurvePrecision * toMeters;

Modified: trunk/MgDev/Common/CoordinateSystem/CoordSysMgrs.cpp
===================================================================
--- trunk/MgDev/Common/CoordinateSystem/CoordSysMgrs.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/CoordinateSystem/CoordSysMgrs.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -308,8 +308,6 @@
 void CCoordinateSystemMgrs::InitMgrsSpecification (MgCoordinateSystemGridSpecification* pSpecification,
                                                    INT32 mgrsGridLevel)
 {
-    double gridIncrement;
-
     MG_TRY ()
         // Initialize the standard stuff.
         pSpecification->SetGridBase (0.0,0.0);
@@ -330,6 +328,7 @@
         else if (mgrsGridLevel >= MgCoordinateSystemMgrsGridLevel::Mgrs100Km &&
                  mgrsGridLevel <= MgCoordinateSystemMgrsGridLevel::Mgrs1m)
         {
+            double gridIncrement;
             switch (mgrsGridLevel) {
             case MgCoordinateSystemMgrsGridLevel::Mgrs100Km:
                 gridIncrement = 100000.0;

Modified: trunk/MgDev/Common/CoordinateSystem/CoordSysTransform.cpp
===================================================================
--- trunk/MgDev/Common/CoordinateSystem/CoordSysTransform.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/CoordinateSystem/CoordSysTransform.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -938,7 +938,6 @@
     double delX, delX2, delY, delY2;
     double dist2, chord2, maxChord;
 
-    double wrkPntX, wrkPntY;
     double midSrcX, midSrcY;
     double midTrgX, midTrgY;
 
@@ -950,8 +949,8 @@
         segList = new rx_Linseg_;
         segList->next = NULL;
 
-        wrkPntX = segList->srcX = segList->trgX = fromPnt->GetX ();
-        wrkPntY = segList->srcY = segList->trgY = fromPnt->GetY ();
+        segList->srcX = segList->trgX = fromPnt->GetX ();
+        segList->srcY = segList->trgY = fromPnt->GetY ();
         Transform (&segList->trgX,&segList->trgY);
 
         // Allocate and populate the last point in the segment list.
@@ -959,8 +958,8 @@
         curPtr->next = NULL;
         segList->next = curPtr;
 
-        wrkPntX = curPtr->srcX = curPtr->trgX = toPnt->GetX ();
-        wrkPntY = curPtr->srcY = curPtr->trgY = toPnt->GetY ();
+        curPtr->srcX = curPtr->trgX = toPnt->GetX ();
+        curPtr->srcY = curPtr->trgY = toPnt->GetY ();
         Transform (&curPtr->trgX,&curPtr->trgY);
 
         // We now have the two end points of the line in the segment list.  Start a
@@ -1317,7 +1316,6 @@
     //If range checking is turned on, find out whether
     //we'll need to warn the caller later on.
     double z=0.;
-    bool bWarn = false;
     int nResult = cs_CNVRT_NRML;
     if (pdZ)
     {

Modified: trunk/MgDev/Common/Foundation/System/Configuration.cpp
===================================================================
--- trunk/MgDev/Common/Foundation/System/Configuration.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/Foundation/System/Configuration.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -639,8 +639,6 @@
 
     if (NULL != validationInfoList)
     {
-        int i = 0;
-
         while (!validationInfoList->m_propertyName.empty())
         {
             if (validationInfoList->m_propertyName == property)

Modified: trunk/MgDev/Common/Foundation/System/Resources.cpp
===================================================================
--- trunk/MgDev/Common/Foundation/System/Resources.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/Foundation/System/Resources.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -182,7 +182,7 @@
     // Clean up the resource cache
     ResourceCache::iterator iterator;
 
-    for(iterator = m_resourceCache.begin(); iterator != m_resourceCache.end(); iterator++)
+    for(iterator = m_resourceCache.begin(); iterator != m_resourceCache.end(); ++iterator)
     {
         DeleteResourceFile(iterator->second);
         iterator->second = NULL;
@@ -487,7 +487,7 @@
 
 void MgResources::DeleteResourceFile(ResourceFile* file)
 {
-    for (ResourceFile::iterator iter = file->begin(); iter != file->end(); iter++)
+    for (ResourceFile::iterator iter = file->begin(); iter != file->end(); ++iter)
     {
         if (NULL != iter->second)
         {

Modified: trunk/MgDev/Common/Foundation/System/StreamData.cpp
===================================================================
--- trunk/MgDev/Common/Foundation/System/StreamData.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/Foundation/System/StreamData.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -56,7 +56,7 @@
 //  </summary>
 //
 //  <param name = "copy">
-//  The MgStreamData objec to copy for the new object.
+//  The MgStreamData object to copy for the new object.
 //  </param>
 MgStreamData::MgStreamData( MgStreamData &copy ) :
     m_Handle( copy.m_Handle ),
@@ -67,7 +67,7 @@
     m_bError( copy.m_bError )
 {
     ACE_ASSERT( m_Handle != 0 );
-    ACE_ASSERT( NULL != (MgStreamHelper*) m_pStreamHelper );
+    ACE_ASSERT( NULL != m_pStreamHelper.p );
 };
 
 ///////////////////////////////////////////////////////////////////////////

Modified: trunk/MgDev/Common/Foundation/System/StreamReader.cpp
===================================================================
--- trunk/MgDev/Common/Foundation/System/StreamReader.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/Foundation/System/StreamReader.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -572,7 +572,7 @@
 
     Ptr<MgSerializable> obj = (MgSerializable*)MgUtil::CreateMgObject(classId); // throws NullPointerException
     //deserialize the object
-    (obj)->Deserialize((MgStream*)this);
+    obj->Deserialize((MgStream*)this);
 
     return obj.Detach();
 }
@@ -583,7 +583,7 @@
 ///
 MgStreamHelper* MgStreamReader::GetStreamHelper()
 {
-    return SAFE_ADDREF((MgStreamHelper*)m_sHelper);
+    return SAFE_ADDREF(m_sHelper.p);
 }
 
 ///<summary>

Modified: trunk/MgDev/Common/Geometry/Buffer/DumpFFGF.cpp
===================================================================
--- trunk/MgDev/Common/Geometry/Buffer/DumpFFGF.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/Geometry/Buffer/DumpFFGF.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -35,14 +35,11 @@
 
     BYTE bytes[1024];
     int nRead = 0;
-    int nTotalRead = 0;
     do
     {
         nRead = byteReader->Read(bytes, 1024);
         if (nRead > 0)
             spBytes->Append(bytes, nRead);
-
-        nTotalRead += nRead;
     }
     while (nRead > 0);
 
@@ -96,8 +93,6 @@
 {
     try
     {
-        int feat_num = featnum;
-
         MgCoordinateCollection* coordinates = new MgCoordinateCollection();
         MgGeometryFactory factory;
 
@@ -125,8 +120,6 @@
 {
     try
     {
-        int feat_num = featnum;
-
         MgCoordinateCollection* coordinates = new MgCoordinateCollection();
         MgGeometryFactory factory;
 
@@ -155,12 +148,6 @@
 {
     try
     {
-        int feat_num = featnum;
-
-        MgCoordinateCollection* coordinates = new MgCoordinateCollection();
-        MgGeometryFactory factory;
-
-
         OpsFloatPoint pt(x, y);
 
         // Create a point

Modified: trunk/MgDev/Common/Geometry/Buffer/planeswp.cpp
===================================================================
--- trunk/MgDev/Common/Geometry/Buffer/planeswp.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/Geometry/Buffer/planeswp.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -1423,8 +1423,6 @@
     // marked as interior (all the edge-sides must be exterior in order for
     // the boundary to qualify for output)
 
-    int j = 0;
-
     do {
         assert(!wEdge->EdgeDeleted());
 

Modified: trunk/MgDev/Common/Geometry/MultiCurveString.cpp
===================================================================
--- trunk/MgDev/Common/Geometry/MultiCurveString.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/Geometry/MultiCurveString.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -140,11 +140,11 @@
 
     //Deserialize from AGF format
     INT32 type;
-    ((MgStreamReader*)stream)->GetInt32(type);
+    reader->GetInt32(type);
     assert(type == MgGeometryType::MultiCurveString);
 
     INT32 numCurveStrings;
-    ((MgStreamReader*)stream)->GetInt32(numCurveStrings);
+    reader->GetInt32(numCurveStrings);
 
     m_curveStrings = new MgCurveStringCollection();
     for(INT32 i = 0; i < numCurveStrings; i++)

Modified: trunk/MgDev/Common/Geometry/MultiLineString.cpp
===================================================================
--- trunk/MgDev/Common/Geometry/MultiLineString.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/Geometry/MultiLineString.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -140,11 +140,11 @@
 
     //Deserialize from AGF format
     INT32 type;
-    ((MgStreamReader*)stream)->GetInt32(type);
+    reader->GetInt32(type);
     assert(type == MgGeometryType::MultiLineString);
 
     INT32 numLineStrings;
-    ((MgStreamReader*)stream)->GetInt32(numLineStrings);
+    reader->GetInt32(numLineStrings);
 
     m_lineStrings = new MgLineStringCollection();
     for(INT32 i = 0; i < numLineStrings; i++)

Modified: trunk/MgDev/Common/MapGuideCommon/Controller/DwfController.cpp
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/Controller/DwfController.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/MapGuideCommon/Controller/DwfController.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -69,7 +69,7 @@
 
     //save the map state in the session repository
     Ptr<MgResourceIdentifier> resId = new MgResourceIdentifier(L"Session:" + sessionId + L"//" + mapDefinition->GetName() + L"." + MgResourceType::Map);
-    map->Save((MgResourceService*)resourceService, (MgResourceIdentifier*)resId);
+    map->Save(resourceService.p, resId.p);
 
     Ptr<MgDwfVersion> dwfv = new MgDwfVersion(dwfVersion, eMapVersion);
 

Modified: trunk/MgDev/Common/MapGuideCommon/MapLayer/Layer.cpp
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/MapLayer/Layer.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/MapGuideCommon/MapLayer/Layer.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -173,7 +173,7 @@
     helper->WriteUINT32(scaleValueCount);
     if(scaleValueCount > 0)
     {
-        for(SCALERANGES::const_iterator it = m_scaleRanges.begin(); it != m_scaleRanges.end(); it++)
+        for(SCALERANGES::const_iterator it = m_scaleRanges.begin(); it != m_scaleRanges.end(); ++it)
             helper->WriteBytes((const unsigned char*)&(*it), sizeof(double));
     }
     helper->WriteString(m_featureSourceId);
@@ -183,7 +183,7 @@
     helper->WriteString(m_geometry);
 
     helper->WriteUINT32((UINT32)m_idProps.size());
-    for (IdPropertyList::iterator ids = m_idProps.begin(); ids != m_idProps.end(); ids++)
+    for (IdPropertyList::iterator ids = m_idProps.begin(); ids != m_idProps.end(); ++ids)
     {
         helper->WriteUINT16(ids->type);
         helper->WriteString(ids->name);

Modified: trunk/MgDev/Common/MapGuideCommon/MapLayer/Map.cpp
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/MapLayer/Map.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/MapGuideCommon/MapLayer/Map.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -99,7 +99,7 @@
     if (MgServiceType::ResourceService == serviceType)
     {
         InitializeResourceService(NULL);
-        return SAFE_ADDREF((MgResourceService*)m_resourceService);
+        return SAFE_ADDREF(m_resourceService.p);
     }
     else
     {
@@ -234,7 +234,7 @@
     if(unresolvedGroupLinks.size() > 0)
     {
         map<MgLayerGroup*, STRING>::const_iterator itUnres;
-        for(itUnres = unresolvedGroupLinks.begin(); itUnres != unresolvedGroupLinks.end(); itUnres++)
+        for(itUnres = unresolvedGroupLinks.begin(); itUnres != unresolvedGroupLinks.end(); ++itUnres)
         {
             itKg = knownGroups.find(itUnres->second);
             assert(itKg != knownGroups.end());
@@ -438,7 +438,7 @@
     }
 
     // load the sorted scales into the vector
-    for (SORTEDSCALES::iterator sIter = sortedScales.begin(); sIter != sortedScales.end(); sIter++)
+    for (SORTEDSCALES::iterator sIter = sortedScales.begin(); sIter != sortedScales.end(); ++sIter)
         m_finiteDisplayScales.push_back(sIter->second);
 
     m_trackChangesDisabled = false;
@@ -872,7 +872,7 @@
     stream->WriteInt32(scaleCount);
     if (scaleCount > 0)
     {
-        for (FINITESCALES::const_iterator it = m_finiteDisplayScales.begin(); it != m_finiteDisplayScales.end(); it++)
+        for (FINITESCALES::const_iterator it = m_finiteDisplayScales.begin(); it != m_finiteDisplayScales.end(); ++it)
             stream->WriteDouble(*it);
     }
 
@@ -1086,7 +1086,7 @@
         }
     }
 
-    for (LayerFeatureSourceMap::iterator fsIter = fsMap.begin(); fsIter != fsMap.end(); fsIter++)
+    for (LayerFeatureSourceMap::iterator fsIter = fsMap.begin(); fsIter != fsMap.end(); ++fsIter)
     {
         // Assumption:  feature source is only referencing one schema
         STRING featureSource = fsIter->first;
@@ -1094,7 +1094,7 @@
         Ptr<MgResourceIdentifier> resId = new MgResourceIdentifier(featureSource);
         LayerClassMap& classList = fsIter->second;
         Ptr<MgStringCollection> classNames = new MgStringCollection();
-        for (LayerClassMap::iterator cIter = classList.begin(); cIter != classList.end(); cIter++)
+        for (LayerClassMap::iterator cIter = classList.begin(); cIter != classList.end(); ++cIter)
         {
             classNames->Add(cIter->first);
         }
@@ -1109,7 +1109,7 @@
                 STRING className = def->GetName();
 
                 LayerList& layers = fsMap[featureSource][className];
-                for (LayerList::iterator lIter = layers.begin(); lIter != layers.end(); lIter++)
+                for (LayerList::iterator lIter = layers.begin(); lIter != layers.end(); ++lIter)
                 {
                     (*lIter)->PopulateIdentityProperties(def);
                 }
@@ -1148,7 +1148,7 @@
     if (!newColorPalette.empty())
     {
         ColorStringList::iterator it = newColorPalette.begin();
-        for (; it != newColorPalette.end(); it++)
+        for (; it != newColorPalette.end(); ++it)
         {
             if (*it != L"")    // filter empty strings
             {

Modified: trunk/MgDev/Common/MapGuideCommon/Services/ConnectionProperties.cpp
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/Services/ConnectionProperties.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/MapGuideCommon/Services/ConnectionProperties.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -193,5 +193,5 @@
 ///
 MgUserInformation* MgConnectionProperties::GetUserInfo()
 {
-    return SAFE_ADDREF((MgUserInformation*)m_userInfo);
+    return SAFE_ADDREF(m_userInfo.p);
 }

Modified: trunk/MgDev/Common/MapGuideCommon/Services/PrintLayout.cpp
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/Services/PrintLayout.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/MapGuideCommon/Services/PrintLayout.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -80,7 +80,7 @@
 
     // Get the PrintLayout contents
     byteReader = resourceService->GetResourceContent(layoutDefinition);
-    Ptr<MgByteSink> byteSink = new MgByteSink((MgByteReader*)byteReader);
+    Ptr<MgByteSink> byteSink = new MgByteSink(byteReader.p);
     string resourceContent;
     byteSink->ToStringUtf8(resourceContent);
 
@@ -149,7 +149,7 @@
 //
 MgPlotSpecification* MgPrintLayout::GetPlotSize()
 {
-    return SAFE_ADDREF((MgPlotSpecification*)m_plotSpec);
+    return SAFE_ADDREF(m_plotSpec.p);
 }
 
 
@@ -197,7 +197,7 @@
     DOMElement* root = pXmlUtil->GetRootNode();
     CHECKNULL(root, L"MgPrintLayout.GetLayoutProperitesFromXml()");
 
-    DOMElement* pageProperties = pXmlUtil->GetElementNode(root, "PageProperties");
+//  DOMElement* pageProperties = pXmlUtil->GetElementNode(root, "PageProperties");
 
     DOMElement* backgroundColor = pXmlUtil->GetElementNode(root, "BackgroundColor");
 
@@ -409,7 +409,7 @@
     if (customLogosCount > 0)
     {
         for (MgCustomLogoInfoVector::iterator iter = m_logos.begin();
-            iter != m_logos.end(); iter++)
+            iter != m_logos.end(); ++iter)
         {
             MgCustomLogoInfo logoInfo = (MgCustomLogoInfo)(*iter);
 
@@ -430,7 +430,7 @@
     if (customTextCount > 0)
     {
         for (MgCustomTextInfoVector::iterator iter = m_text.begin();
-            iter != m_text.end(); iter++)
+            iter != m_text.end(); ++iter)
         {
             MgCustomTextInfo textInfo = (MgCustomTextInfo)(*iter);
 

Modified: trunk/MgDev/Common/MapGuideCommon/Services/ProxyDataReader.cpp
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/Services/ProxyDataReader.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/MapGuideCommon/Services/ProxyDataReader.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -541,9 +541,7 @@
 MgByteReader* MgProxyDataReader::GetBLOB(CREFSTRING propertyName)
 {
     Ptr<MgBlobProperty> ptrProp = (MgBlobProperty*)GetProperty(propertyName, MgPropertyType::Blob);
-    Ptr<MgByteReader> retVal = ptrProp->GetValue();
-
-    return SAFE_ADDREF((MgByteReader*)retVal);
+    return ptrProp->GetValue();
 }
 
 //////////////////////////////////////////////////////////////////
@@ -556,9 +554,7 @@
 MgByteReader* MgProxyDataReader::GetBLOB(INT32 index)
 {
     Ptr<MgBlobProperty> ptrProp = (MgBlobProperty*)GetProperty(index, MgPropertyType::Blob);
-    Ptr<MgByteReader> retVal = ptrProp->GetValue();
-
-    return SAFE_ADDREF((MgByteReader*)retVal);
+    return ptrProp->GetValue();
 }
 
 //////////////////////////////////////////////////////////////////
@@ -571,9 +567,7 @@
 MgByteReader* MgProxyDataReader::GetCLOB(CREFSTRING propertyName)
 {
     Ptr<MgClobProperty> ptrProp = (MgClobProperty*)GetProperty(propertyName, MgPropertyType::Clob);
-    Ptr<MgByteReader> retVal = ptrProp->GetValue();
-
-    return SAFE_ADDREF((MgByteReader*)retVal);
+    return ptrProp->GetValue();
 }
 
 //////////////////////////////////////////////////////////////////
@@ -586,9 +580,7 @@
 MgByteReader* MgProxyDataReader::GetCLOB(INT32 index)
 {
     Ptr<MgClobProperty> ptrProp = (MgClobProperty*)GetProperty(index, MgPropertyType::Clob);
-    Ptr<MgByteReader> retVal = ptrProp->GetValue();
-
-    return SAFE_ADDREF((MgByteReader*)retVal);
+    return ptrProp->GetValue();
 }
 
 //////////////////////////////////////////////////////////////////
@@ -601,9 +593,7 @@
 MgByteReader* MgProxyDataReader::GetGeometry(CREFSTRING propertyName)
 {
     Ptr<MgGeometryProperty> ptrProp = (MgGeometryProperty*)GetProperty(propertyName, MgPropertyType::Geometry);
-    Ptr<MgByteReader> retVal = ptrProp->GetValue();
-
-    return SAFE_ADDREF((MgByteReader*)retVal);
+    return ptrProp->GetValue();
 }
 
 //////////////////////////////////////////////////////////////////
@@ -616,9 +606,7 @@
 MgByteReader* MgProxyDataReader::GetGeometry(INT32 index)
 {
     Ptr<MgGeometryProperty> ptrProp = (MgGeometryProperty*)GetProperty(index, MgPropertyType::Geometry);
-    Ptr<MgByteReader> retVal = ptrProp->GetValue();
-
-    return SAFE_ADDREF((MgByteReader*)retVal);
+    return ptrProp->GetValue();
 }
 
 //////////////////////////////////////////////////////////////////
@@ -685,8 +673,7 @@
     Ptr<MgByteSource> byteSource = new MgByteSource((BYTE_ARRAY_IN)xmlStr.c_str(), (INT32)xmlStr.length());
     byteSource->SetMimeType(MgMimeType::Xml);
 
-    Ptr<MgByteReader> byteReader = byteSource->GetReader();
-    return SAFE_ADDREF((MgByteReader*)byteReader);
+    return byteSource->GetReader();
 }
 
 void MgProxyDataReader::ToXml(string &str)

Modified: trunk/MgDev/Common/MapGuideCommon/Services/ProxyFeatureReader.cpp
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/Services/ProxyFeatureReader.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/MapGuideCommon/Services/ProxyFeatureReader.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -43,7 +43,7 @@
 {
     m_currRecord = 0;
     m_serverfeatReader = L"";
-    m_set = SAFE_ADDREF((MgFeatureSet*)featureSet);
+    m_set = SAFE_ADDREF(featureSet);
     m_service = NULL;
 }
 
@@ -80,7 +80,7 @@
 void MgProxyFeatureReader::AssignFeatureSet(MgFeatureSet* featureSet)
 {
     m_currRecord = 0;
-    m_set = SAFE_ADDREF((MgFeatureSet*)featureSet);
+    m_set = SAFE_ADDREF(featureSet);
 }
 
 /////////////////////////////////////////////////////////////////
@@ -569,9 +569,7 @@
 MgByteReader* MgProxyFeatureReader::GetBLOB(CREFSTRING propertyName)
 {
     Ptr<MgBlobProperty> ptrProp = (MgBlobProperty*)GetProperty(propertyName, MgPropertyType::Blob);
-    Ptr<MgByteReader> retVal = ptrProp->GetValue();
-
-    return SAFE_ADDREF((MgByteReader*)retVal);
+    return ptrProp->GetValue();
 }
 
 //////////////////////////////////////////////////////////////////
@@ -586,9 +584,7 @@
 MgByteReader* MgProxyFeatureReader::GetBLOB(INT32 index)
 {
     Ptr<MgBlobProperty> ptrProp = (MgBlobProperty*)GetProperty(index, MgPropertyType::Blob);
-    Ptr<MgByteReader> retVal = ptrProp->GetValue();
-
-    return SAFE_ADDREF((MgByteReader*)retVal);
+    return ptrProp->GetValue();
 }
 
 //////////////////////////////////////////////////////////////////
@@ -603,9 +599,7 @@
 MgByteReader* MgProxyFeatureReader::GetCLOB(CREFSTRING propertyName)
 {
     Ptr<MgClobProperty> ptrProp = (MgClobProperty*)GetProperty(propertyName, MgPropertyType::Clob);
-    Ptr<MgByteReader> retVal = ptrProp->GetValue();
-
-    return SAFE_ADDREF((MgByteReader*)retVal);
+    return ptrProp->GetValue();
 }
 
 //////////////////////////////////////////////////////////////////
@@ -620,9 +614,7 @@
 MgByteReader* MgProxyFeatureReader::GetCLOB(INT32 index)
 {
     Ptr<MgClobProperty> ptrProp = (MgClobProperty*)GetProperty(index, MgPropertyType::Clob);
-    Ptr<MgByteReader> retVal = ptrProp->GetValue();
-
-    return SAFE_ADDREF((MgByteReader*)retVal);
+    return ptrProp->GetValue();
 }
 
 
@@ -638,9 +630,7 @@
 MgFeatureReader* MgProxyFeatureReader::GetFeatureObject(CREFSTRING propertyName)
 {
     Ptr<MgFeatureProperty> ptrProp = (MgFeatureProperty*)GetProperty(propertyName, MgPropertyType::Feature);
-    Ptr<MgFeatureReader> retVal = ptrProp->GetValue();
-
-    return SAFE_ADDREF((MgFeatureReader*)retVal);
+    return ptrProp->GetValue();
 }
 
 //////////////////////////////////////////////////////////////////
@@ -655,9 +645,7 @@
 MgFeatureReader* MgProxyFeatureReader::GetFeatureObject(INT32 index)
 {
     Ptr<MgFeatureProperty> ptrProp = (MgFeatureProperty*)GetProperty(index, MgPropertyType::Feature);
-    Ptr<MgFeatureReader> retVal = ptrProp->GetValue();
-
-    return SAFE_ADDREF((MgFeatureReader*)retVal);
+    return ptrProp->GetValue();
 }
 
 //////////////////////////////////////////////////////////////////
@@ -672,9 +660,7 @@
 MgByteReader* MgProxyFeatureReader::GetGeometry(CREFSTRING propertyName)
 {
     Ptr<MgGeometryProperty> ptrProp = (MgGeometryProperty*)GetProperty(propertyName, MgPropertyType::Geometry);
-    Ptr<MgByteReader> retVal = ptrProp->GetValue();
-
-    return SAFE_ADDREF((MgByteReader*)retVal);
+    return ptrProp->GetValue();
 }
 
 //////////////////////////////////////////////////////////////////
@@ -689,9 +675,7 @@
 MgByteReader* MgProxyFeatureReader::GetGeometry(INT32 index)
 {
     Ptr<MgGeometryProperty> ptrProp = (MgGeometryProperty*)GetProperty(index, MgPropertyType::Geometry);
-    Ptr<MgByteReader> retVal = ptrProp->GetValue();
-
-    return SAFE_ADDREF((MgByteReader*)retVal);
+    return ptrProp->GetValue();
 }
 
 // Get the property for the specified name
@@ -712,7 +696,7 @@
     INT16 propType = ptrProp->GetPropertyType();
     CHECK_PROPERTY_TYPE(propType, expectedType, L"MgProxyFeatureReader.GetProperty");
 
-    return SAFE_ADDREF((MgProperty*)ptrProp);
+    return SAFE_ADDREF(ptrProp.p);
 }
 
 // Get the property for the specified index
@@ -735,7 +719,7 @@
     INT16 propType = ptrProp->GetPropertyType();
     CHECK_PROPERTY_TYPE(propType, expectedType, L"MgProxyFeatureReader.GetProperty");
 
-    return SAFE_ADDREF((MgProperty*)ptrProp);
+    return SAFE_ADDREF(ptrProp.p);
 }
 
 // Get the property for the specified name
@@ -750,7 +734,7 @@
     Ptr<MgProperty> ptrProp = ptrCol->GetItem(propertyName);
     CHECKNULL(ptrProp, L"MgProxyFeatureReader.GetProperty");
 
-    return SAFE_ADDREF((MgProperty*)ptrProp);
+    return SAFE_ADDREF(ptrProp.p);
 }
 
 // Get the property for the specified index
@@ -765,7 +749,7 @@
     Ptr<MgProperty> ptrProp = ptrCol->GetItem(index);
     CHECKNULL(ptrProp, L"MgProxyFeatureReader.GetProperty");
 
-    return SAFE_ADDREF((MgProperty*)ptrProp);
+    return SAFE_ADDREF(ptrProp.p);
 }
 
 //////////////////////////////////////////////////////////////////
@@ -792,7 +776,7 @@
     if (operationCompleted)
     {
         stream->WriteString(m_serverfeatReader);
-        stream->WriteObject((MgFeatureSet*)m_set); // Write the feature set
+        stream->WriteObject(m_set.p); // Write the feature set
     }
 }
 
@@ -834,8 +818,7 @@
     this->ToXml(xmlStr);
 
     Ptr<MgByteSource> byteSource = new MgByteSource((BYTE_ARRAY_IN)xmlStr.c_str(), (INT32)xmlStr.length());
-    Ptr<MgByteReader> byteReader = byteSource->GetReader();
-    return SAFE_ADDREF((MgByteReader*)byteReader);
+    return byteSource->GetReader();
 }
 
 void MgProxyFeatureReader::ToXml(string &str)

Modified: trunk/MgDev/Common/MapGuideCommon/Services/ProxyFeatureTransaction.cpp
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/Services/ProxyFeatureTransaction.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/MapGuideCommon/Services/ProxyFeatureTransaction.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -85,7 +85,7 @@
 
     if (operationCompleted)
     {
-        stream->WriteObject((MgResourceIdentifier*)m_resourceId);
+        stream->WriteObject(m_resourceId.p);
         stream->WriteString(m_transactionId); // Get the transaction ID so we can use it
     }
 }

Modified: trunk/MgDev/Common/MapGuideCommon/Services/ProxyGwsFeatureReader.cpp
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/Services/ProxyGwsFeatureReader.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/MapGuideCommon/Services/ProxyGwsFeatureReader.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -29,7 +29,7 @@
 {
     m_currRecord = 0;
     m_serverGwsFeatureReader = L"";
-    m_set = SAFE_ADDREF((MgFeatureSet*)featureSet);
+    m_set = SAFE_ADDREF(featureSet);
     m_service = NULL;
 }
 
@@ -66,7 +66,7 @@
 void MgProxyGwsFeatureReader::AssignFeatureSet(MgFeatureSet* featureSet)
 {
     m_currRecord = 0;
-    m_set = SAFE_ADDREF((MgFeatureSet*)featureSet);
+    m_set = SAFE_ADDREF(featureSet);
 }
 
 //////////////////////////////////////////////////////////////////
@@ -511,9 +511,7 @@
 MgByteReader* MgProxyGwsFeatureReader::GetBLOB(CREFSTRING propertyName)
 {
     Ptr<MgBlobProperty> ptrProp = (MgBlobProperty*)GetProperty(propertyName, MgPropertyType::Blob);
-    Ptr<MgByteReader> retVal = ptrProp->GetValue();
-
-    return SAFE_ADDREF((MgByteReader*)retVal);
+    return ptrProp->GetValue();
 }
 
 //////////////////////////////////////////////////////////////////
@@ -526,9 +524,7 @@
 MgByteReader* MgProxyGwsFeatureReader::GetBLOB(INT32 index)
 {
     Ptr<MgBlobProperty> ptrProp = (MgBlobProperty*)GetProperty(index, MgPropertyType::Blob);
-    Ptr<MgByteReader> retVal = ptrProp->GetValue();
-
-    return SAFE_ADDREF((MgByteReader*)retVal);
+    return ptrProp->GetValue();
 }
 
 
@@ -542,9 +538,7 @@
 MgByteReader* MgProxyGwsFeatureReader::GetCLOB(CREFSTRING propertyName)
 {
     Ptr<MgClobProperty> ptrProp = (MgClobProperty*)GetProperty(propertyName, MgPropertyType::Clob);
-    Ptr<MgByteReader> retVal = ptrProp->GetValue();
-
-    return SAFE_ADDREF((MgByteReader*)retVal);
+    return ptrProp->GetValue();
 }
 
 //////////////////////////////////////////////////////////////////
@@ -557,9 +551,7 @@
 MgByteReader* MgProxyGwsFeatureReader::GetCLOB(INT32 index)
 {
     Ptr<MgClobProperty> ptrProp = (MgClobProperty*)GetProperty(index, MgPropertyType::Clob);
-    Ptr<MgByteReader> retVal = ptrProp->GetValue();
-
-    return SAFE_ADDREF((MgByteReader*)retVal);
+    return ptrProp->GetValue();
 }
 
 
@@ -575,9 +567,7 @@
 MgFeatureReader* MgProxyGwsFeatureReader::GetFeatureObject(CREFSTRING propertyName)
 {
     Ptr<MgFeatureProperty> ptrProp = (MgFeatureProperty*)GetProperty(propertyName, MgPropertyType::Feature);
-    Ptr<MgFeatureReader> retVal = ptrProp->GetValue();
-
-    return SAFE_ADDREF((MgFeatureReader*)retVal);
+    return ptrProp->GetValue();
 }
 
 //////////////////////////////////////////////////////////////////
@@ -592,9 +582,7 @@
 MgFeatureReader* MgProxyGwsFeatureReader::GetFeatureObject(INT32 index)
 {
     Ptr<MgFeatureProperty> ptrProp = (MgFeatureProperty*)GetProperty(index, MgPropertyType::Feature);
-    Ptr<MgFeatureReader> retVal = ptrProp->GetValue();
-
-    return SAFE_ADDREF((MgFeatureReader*)retVal);
+    return ptrProp->GetValue();
 }
 
 
@@ -608,9 +596,7 @@
 MgByteReader* MgProxyGwsFeatureReader::GetGeometry(CREFSTRING propertyName)
 {
     Ptr<MgGeometryProperty> ptrProp = (MgGeometryProperty*)GetProperty(propertyName, MgPropertyType::Geometry);
-    Ptr<MgByteReader> retVal = ptrProp->GetValue();
-
-    return SAFE_ADDREF((MgByteReader*)retVal);
+    return ptrProp->GetValue();
 }
 
 //////////////////////////////////////////////////////////////////
@@ -623,9 +609,7 @@
 MgByteReader* MgProxyGwsFeatureReader::GetGeometry(INT32 index)
 {
     Ptr<MgGeometryProperty> ptrProp = (MgGeometryProperty*)GetProperty(index, MgPropertyType::Geometry);
-    Ptr<MgByteReader> retVal = ptrProp->GetValue();
-
-    return SAFE_ADDREF((MgByteReader*)retVal);
+    return ptrProp->GetValue();
 }
 
 // Get the property for the specified name
@@ -646,7 +630,7 @@
     INT16 propType = ptrProp->GetPropertyType();
     MG_CHECK_PROPERTY_TYPE(propType, expectedType, L"MgProxyGwsFeatureReader.GetProperty");
 
-    return SAFE_ADDREF((MgProperty*)ptrProp);
+    return SAFE_ADDREF(ptrProp.p);
 }
 
 // Get the property for the specified name
@@ -661,7 +645,7 @@
     Ptr<MgProperty> ptrProp = ptrCol->GetItem(propertyName);
     CHECKNULL(ptrProp, L"MgProxyGwsFeatureReader.GetProperty");
 
-    return SAFE_ADDREF((MgProperty*)ptrProp);
+    return SAFE_ADDREF(ptrProp.p);
 }
 
 // Get the property for the specified index
@@ -685,7 +669,7 @@
     INT16 propType = ptrProp->GetPropertyType();
     MG_CHECK_PROPERTY_TYPE(propType, expectedType, L"MgProxyGwsFeatureReader.GetProperty");
 
-    return SAFE_ADDREF((MgProperty*)ptrProp);
+    return SAFE_ADDREF(ptrProp.p);
 }
 
 // Get the property for the specified index
@@ -700,7 +684,7 @@
     Ptr<MgProperty> ptrProp = ptrCol->GetItem(index);
     CHECKNULL(ptrProp, L"MgProxyGwsFeatureReader.GetProperty");
 
-    return SAFE_ADDREF((MgProperty*)ptrProp);
+    return SAFE_ADDREF(ptrProp.p);
 }
 
 //////////////////////////////////////////////////////////////////
@@ -727,7 +711,7 @@
     if (operationCompleted)
     {
         stream->WriteString(m_serverGwsFeatureReader);
-        stream->WriteObject((MgFeatureSet*)m_set); // Write the feature set
+        stream->WriteObject(m_set.p); // Write the feature set
     }
 }
 
@@ -771,8 +755,7 @@
     Ptr<MgByteSource> byteSource = new MgByteSource((BYTE_ARRAY_IN)xmlStr.c_str(), (INT32)xmlStr.length());
     byteSource->SetMimeType(MgMimeType::Xml);
 
-    Ptr<MgByteReader> byteReader = byteSource->GetReader();
-    return SAFE_ADDREF((MgByteReader*)byteReader);
+    return byteSource->GetReader();
 }
 
 void MgProxyGwsFeatureReader::ToXml(string &str)

Modified: trunk/MgDev/Common/MapGuideCommon/Services/ProxySqlDataReader.cpp
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/Services/ProxySqlDataReader.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/MapGuideCommon/Services/ProxySqlDataReader.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -547,9 +547,7 @@
 MgByteReader* MgProxySqlDataReader::GetBLOB(CREFSTRING propertyName)
 {
     Ptr<MgBlobProperty> ptrProp = (MgBlobProperty*)GetProperty(propertyName, MgPropertyType::Blob);
-    Ptr<MgByteReader> retVal = ptrProp->GetValue();
-
-    return SAFE_ADDREF((MgByteReader*)retVal);
+    return ptrProp->GetValue();
 }
 
 //////////////////////////////////////////////////////////////////
@@ -562,9 +560,7 @@
 MgByteReader* MgProxySqlDataReader::GetBLOB(INT32 index)
 {
     Ptr<MgBlobProperty> ptrProp = (MgBlobProperty*)GetProperty(index, MgPropertyType::Blob);
-    Ptr<MgByteReader> retVal = ptrProp->GetValue();
-
-    return SAFE_ADDREF((MgByteReader*)retVal);
+    return ptrProp->GetValue();
 }
 
 
@@ -578,9 +574,7 @@
 MgByteReader* MgProxySqlDataReader::GetCLOB(CREFSTRING propertyName)
 {
     Ptr<MgClobProperty> ptrProp = (MgClobProperty*)GetProperty(propertyName, MgPropertyType::Clob);
-    Ptr<MgByteReader> retVal = ptrProp->GetValue();
-
-    return SAFE_ADDREF((MgByteReader*)retVal);
+    return ptrProp->GetValue();
 }
 
 //////////////////////////////////////////////////////////////////
@@ -593,9 +587,7 @@
 MgByteReader* MgProxySqlDataReader::GetCLOB(INT32 index)
 {
     Ptr<MgClobProperty> ptrProp = (MgClobProperty*)GetProperty(index, MgPropertyType::Clob);
-    Ptr<MgByteReader> retVal = ptrProp->GetValue();
-
-    return SAFE_ADDREF((MgByteReader*)retVal);
+    return ptrProp->GetValue();
 }
 
 //////////////////////////////////////////////////////////////////
@@ -608,9 +600,7 @@
 MgByteReader* MgProxySqlDataReader::GetGeometry(CREFSTRING propertyName)
 {
     Ptr<MgGeometryProperty> ptrProp = (MgGeometryProperty*)GetProperty(propertyName, MgPropertyType::Geometry);
-    Ptr<MgByteReader> retVal = ptrProp->GetValue();
-
-    return SAFE_ADDREF((MgByteReader*)retVal);
+    return ptrProp->GetValue();
 }
 
 //////////////////////////////////////////////////////////////////
@@ -623,9 +613,7 @@
 MgByteReader* MgProxySqlDataReader::GetGeometry(INT32 index)
 {
     Ptr<MgGeometryProperty> ptrProp = (MgGeometryProperty*)GetProperty(index, MgPropertyType::Geometry);
-    Ptr<MgByteReader> retVal = ptrProp->GetValue();
-
-    return SAFE_ADDREF((MgByteReader*)retVal);
+    return ptrProp->GetValue();
 }
 
 //////////////////////////////////////////////////////////////////
@@ -683,8 +671,7 @@
     Ptr<MgByteSource> byteSource = new MgByteSource((BYTE_ARRAY_IN)xmlStr.c_str(), (INT32)xmlStr.length());
     byteSource->SetMimeType(MgMimeType::Xml);
 
-    Ptr<MgByteReader> byteReader = byteSource->GetReader();
-    return SAFE_ADDREF((MgByteReader*)byteReader);
+    return byteSource->GetReader();
 }
 
 void MgProxySqlDataReader::ToXml(string &str)

Modified: trunk/MgDev/Common/MapGuideCommon/Services/ServerConnection.cpp
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/Services/ServerConnection.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/MapGuideCommon/Services/ServerConnection.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -222,7 +222,7 @@
     {
         stream = new MgAceStreamHelper(handle);
     }
-    return SAFE_ADDREF((MgStreamHelper*)stream);
+    return SAFE_ADDREF(stream.p);
 }
 
 //////////////////////////////////////////////////////////////////
@@ -243,7 +243,7 @@
         m_stream->SetConnection(this);
     }
 
-    return SAFE_ADDREF((MgStream*)m_stream);
+    return SAFE_ADDREF(m_stream.p);
 }
 
 
@@ -286,7 +286,7 @@
 MgServerConnection* MgServerConnection::Acquire(MgUserInformation* userInformation,
                                                 MgConnectionProperties* connProp)
 {
-    CHECKNULL((MgUserInformation*)userInformation, L"MgServerConnection.Acquire");
+    CHECKNULL(userInformation, L"MgServerConnection.Acquire");
     CHECKNULL((MgConnectionProperties*)connProp, L"MgServerConnection.Acquire");
 
     MgServerConnectionPool* connectionPool = MgServerConnectionPool::GetInstance();

Modified: trunk/MgDev/Common/MapGuideCommon/Services/ServerConnectionPool.cpp
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/Services/ServerConnectionPool.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/MapGuideCommon/Services/ServerConnectionPool.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -60,7 +60,7 @@
         delete iter->second;
         iter->second = NULL;
 
-        iter++;
+        ++iter;
     }
 
     pool.clear();

Modified: trunk/MgDev/Common/MapGuideCommon/Services/ServerConnectionStack.cpp
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/Services/ServerConnectionStack.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/MapGuideCommon/Services/ServerConnectionStack.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -85,7 +85,7 @@
     {
         (*iter)->SetStack(NULL);
         SAFE_RELEASE((*iter));
-        iter++;
+        ++iter;
     }
     m_inUse->clear();
     delete m_inUse;

Modified: trunk/MgDev/Common/MapGuideCommon/Services/Site.cpp
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/Services/Site.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/MapGuideCommon/Services/Site.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -1339,7 +1339,7 @@
 
     MG_SITE_TRY()
 
-    CHECKARGUMENTNULL((MgUserInformation*)userInformation, L"MgSite.Authenticate")
+    CHECKARGUMENTNULL(userInformation, L"MgSite.Authenticate")
 
     assert(m_connProp == NULL);
     MgSiteManager* siteManager = MgSiteManager::GetInstance();

Modified: trunk/MgDev/Common/MapGuideCommon/Services/SiteManager.cpp
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/Services/SiteManager.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/MapGuideCommon/Services/SiteManager.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -169,7 +169,7 @@
     ACE_MT(ACE_GUARD(ACE_Recursive_Thread_Mutex, ace_mon, m_mutex));
 
     for (MgSiteVector::iterator iter = m_sites.begin();
-        iter != m_sites.end(); iter++)
+        iter != m_sites.end(); ++iter)
     {
         SAFE_RELEASE(*iter);
     }

Modified: trunk/MgDev/Common/MapGuideCommon/Services/SqlResult.cpp
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/Services/SqlResult.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/MapGuideCommon/Services/SqlResult.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -49,7 +49,7 @@
 
 MgSqlDataReader * MgSqlResult::GetReader()
 {
-    return SAFE_ADDREF((MgSqlDataReader *)m_reader);
+    return SAFE_ADDREF(m_reader.p);
 }
 
 void MgSqlResult::Serialize(MgStream *stream)

Modified: trunk/MgDev/Common/MdfParser/SAX2ElementHandler.h
===================================================================
--- trunk/MgDev/Common/MdfParser/SAX2ElementHandler.h	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/MdfParser/SAX2ElementHandler.h	2010-12-29 06:32:51 UTC (rev 5487)
@@ -93,7 +93,7 @@
     {                                                                           \
         std::vector<std::wstring>::const_iterator iter = _elementMap.begin();   \
         int id = 1;                                                             \
-        for (iter++; iter != _elementMap.end(); iter++)                         \
+        for (++iter; iter != _elementMap.end(); ++iter)                         \
         {                                                                       \
             if (0 == ::wcscmp(iter->c_str(), name))                             \
                 return id;                                                      \

Modified: trunk/MgDev/Common/PlatformBase/Data/DateTimeProperty.cpp
===================================================================
--- trunk/MgDev/Common/PlatformBase/Data/DateTimeProperty.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/PlatformBase/Data/DateTimeProperty.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -121,7 +121,6 @@
     if (!this->IsNull())
     {
         str += "<Value>";
-        char buf[128]; buf[0] = 0;
         Ptr<MgDateTime> dtPtr = this->GetValue();
         if (dtPtr != NULL)
         {

Modified: trunk/MgDev/Common/PlatformBase/MapLayer/MapBase.cpp
===================================================================
--- trunk/MgDev/Common/PlatformBase/MapLayer/MapBase.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/PlatformBase/MapLayer/MapBase.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -743,7 +743,7 @@
     {
         INT32 count = 0;
         double minDiff = -1.0;
-        for (FINITESCALES::const_iterator it = m_finiteDisplayScales.begin(); it != m_finiteDisplayScales.end(); it++)
+        for (FINITESCALES::const_iterator it = m_finiteDisplayScales.begin(); it != m_finiteDisplayScales.end(); ++it)
         {
             double displayScale = *it;
             double diff = fabs(scale - displayScale);

Modified: trunk/MgDev/Common/PlatformBase/MapLayer/SelectionBase.cpp
===================================================================
--- trunk/MgDev/Common/PlatformBase/MapLayer/SelectionBase.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/PlatformBase/MapLayer/SelectionBase.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -53,11 +53,11 @@
 {
     // Delete selection manually instead of relying on deep template deletion
     SelectionMap::iterator lIter;
-    for (lIter = m_selections.begin(); lIter != m_selections.end(); lIter++)
+    for (lIter = m_selections.begin(); lIter != m_selections.end(); ++lIter)
     {
         SelectedClassMap* clsmap = lIter->second;
         SelectedClassMap::iterator cIter;
-        for (cIter = clsmap->begin(); cIter != clsmap->end(); cIter++)
+        for (cIter = clsmap->begin(); cIter != clsmap->end(); ++cIter)
         {
             SelectionList* list = cIter->second;
             cIter->second = NULL;
@@ -200,14 +200,14 @@
     xml.append(L"<FeatureSet xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"FeatureSet-1.0.0.xsd\">");
 
     SelectionMap::iterator lIter;
-    for (lIter = m_selections.begin(); lIter != m_selections.end(); lIter++)
+    for (lIter = m_selections.begin(); lIter != m_selections.end(); ++lIter)
     {
         xml.append(L" <Layer id=\"");
         xml.append(lIter->first);
         xml.append(L"\">");
 
         SelectedClassMap::iterator cIter;
-        for (cIter = lIter->second->begin(); cIter != lIter->second->end(); cIter++)
+        for (cIter = lIter->second->begin(); cIter != lIter->second->end(); ++cIter)
         {
             xml.append(L"  <Class id=\"");
             xml.append(cIter->first);
@@ -223,7 +223,7 @@
             }
 
             SelectionList::iterator sIter;
-            for (sIter = cIter->second->begin(); sIter != cIter->second->end(); sIter++)
+            for (sIter = cIter->second->begin(); sIter != cIter->second->end(); ++sIter)
             {
                 selXml.append(L"   <ID>");
                 selXml.append(*sIter);
@@ -262,7 +262,7 @@
     {
         m_stream->Clear();
         MgLayerBase::IdPropertyList propList = layer->GetIdPropertyList();
-        for (MgLayerBase::IdPropertyList::iterator idIter = propList.begin(); idIter != propList.end(); idIter++)
+        for (MgLayerBase::IdPropertyList::iterator idIter = propList.begin(); idIter != propList.end(); ++idIter)
         {
             switch (idIter->type)
             {
@@ -311,7 +311,7 @@
 
     MgLayerBase::IdPropertyList propList = layer->GetIdPropertyList();
     MgLayerBase::IdPropertyList::iterator idIter;
-    for (idIter = propList.begin(); idIter != propList.end(); idIter++)
+    for (idIter = propList.begin(); idIter != propList.end(); ++idIter)
     {
         Ptr<MgProperty> prop = props->GetItem(idIter->name);
         switch (idIter->type)
@@ -473,7 +473,7 @@
     {
         SelectedClassMap* classMap = lIter->second;
         SelectedClassMap::iterator cIter;
-        for (cIter = classMap->begin(); cIter != classMap->end(); cIter++)
+        for (cIter = classMap->begin(); cIter != classMap->end(); ++cIter)
         {
             strColl->Add(cIter->first);
         }
@@ -535,7 +535,7 @@
         bool bFirstSel = true;
 
         SelectionList::iterator sIter;
-        for (sIter = selList->begin(); sIter != selList->end(); sIter++)
+        for (sIter = selList->begin(); sIter != selList->end(); ++sIter)
         {
             m_stream->FromBase64(*sIter);
 
@@ -543,7 +543,7 @@
 
             bool bFirstProp = true;
             MgLayerBase::IdPropertyList::iterator idIter;
-            for (idIter = idList.begin(); idIter != idList.end(); idIter++)
+            for (idIter = idList.begin(); idIter != idList.end(); ++idIter)
             {
                 if (!bFirstProp)
                 {
@@ -945,17 +945,17 @@
 void MgSelectionBase::Serialize(MgStream* stream)
 {
     stream->WriteInt32((INT32)m_selections.size());
-    for(SelectionMap::iterator lIter = m_selections.begin(); lIter != m_selections.end(); lIter++)
+    for(SelectionMap::iterator lIter = m_selections.begin(); lIter != m_selections.end(); ++lIter)
     {
         stream->WriteString(lIter->first);
         SelectedClassMap* classMap = lIter->second;
         stream->WriteInt32((INT32)classMap->size());
-        for(SelectedClassMap::iterator cIter = classMap->begin(); cIter != classMap->end(); cIter++)
+        for(SelectedClassMap::iterator cIter = classMap->begin(); cIter != classMap->end(); ++cIter)
         {
             stream->WriteString(cIter->first);
             SelectionList* selectionList = cIter->second;
             stream->WriteInt32((INT32)selectionList->size());
-            for(SelectionList::iterator sIter = selectionList->begin(); sIter != selectionList->end(); sIter++)
+            for(SelectionList::iterator sIter = selectionList->begin(); sIter != selectionList->end(); ++sIter)
                 stream->WriteString(*sIter);
         }
     }

Modified: trunk/MgDev/Common/Renderers/AGGImageIO.cpp
===================================================================
--- trunk/MgDev/Common/Renderers/AGGImageIO.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/Renderers/AGGImageIO.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -870,7 +870,7 @@
     {
         // add colors from the colorpalette (duplicate color entries make the used palette less than 256)
         RS_ColorVector::iterator it;
-        for (it = baseColorPalette->begin();it != baseColorPalette->end(); it++)
+        for (it = baseColorPalette->begin();it != baseColorPalette->end(); ++it)
         {
             gdImageColorAllocate(gdPPalette, (*it).red(), (*it).green(), (*it).blue());
         }

Modified: trunk/MgDev/Common/Renderers/AGGRenderer.cpp
===================================================================
--- trunk/MgDev/Common/Renderers/AGGRenderer.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/Renderers/AGGRenderer.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -115,6 +115,8 @@
 m_mapInfo(NULL),
 m_layerInfo(NULL),
 m_fcInfo(NULL),
+m_bIsSymbolW2D(false),
+m_bHaveViewport(false),
 m_bRequiresClipping(requiresClipping),
 m_bLocalOverposting(localOverposting),
 m_imsym(NULL),

Modified: trunk/MgDev/Common/Renderers/AGGRenderer.h
===================================================================
--- trunk/MgDev/Common/Renderers/AGGRenderer.h	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/Renderers/AGGRenderer.h	2010-12-29 06:32:51 UTC (rev 5487)
@@ -75,16 +75,16 @@
     // Renderer implementation
     //
     RENDERERS_API virtual void StartMap(RS_MapUIInfo* mapInfo,
-                                          RS_Bounds&    extents,
-                                          double        mapScale,
-                                          double        dpi,
-                                          double        metersPerUnit,
-                                          CSysTransformer* xformToLL = NULL);
+                                        RS_Bounds&    extents,
+                                        double        mapScale,
+                                        double        dpi,
+                                        double        metersPerUnit,
+                                        CSysTransformer* xformToLL = NULL);
 
     RENDERERS_API virtual void EndMap();
 
     RENDERERS_API virtual void StartLayer(RS_LayerUIInfo*      legendInfo,
-                                            RS_FeatureClassInfo* classInfo);
+                                          RS_FeatureClassInfo* classInfo);
 
     RENDERERS_API virtual void EndLayer();
 
@@ -158,20 +158,20 @@
     RENDERERS_API void SetWorldToScreenTransform(SE_Matrix& xform);
 
     RENDERERS_API void DrawString(const RS_String& s,
-                    double           x,
-                    double           y,
-                    double           width,
-                    double           height,
-                    const RS_Font*   font,
-                    RS_Color&  color,
-                    double           angle);
+                                  double           x,
+                                  double           y,
+                                  double           width,
+                                  double           height,
+                                  const RS_Font*   font,
+                                  RS_Color&  color,
+                                  double           angle);
 
     RENDERERS_API void MeasureString(const RS_String& s,
-                       double           height,
-                       const RS_Font*   font,
-                       double           angleRad,
-                       RS_F_Point*      res,
-                       float*           offsets);
+                                     double           height,
+                                     const RS_Font*   font,
+                                     double           angleRad,
+                                     RS_F_Point*      res,
+                                     float*           offsets);
 
     RENDERERS_API const RS_Font* FindFont(RS_FontDef& def);
 

Modified: trunk/MgDev/Common/Renderers/DWFRenderer.cpp
===================================================================
--- trunk/MgDev/Common/Renderers/DWFRenderer.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/Renderers/DWFRenderer.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -333,25 +333,25 @@
 void DWFRenderer::EndMap()
 {
     for (stream_list::iterator iter = m_lLayerStreams.begin();
-        iter != m_lLayerStreams.end(); iter++)
+        iter != m_lLayerStreams.end(); ++iter)
     {
         DWFCORE_FREE_OBJECT(*iter);
     }
 
     for (stream_list::iterator iter = m_lLabelStreams.begin();
-        iter != m_lLabelStreams.end(); iter++)
+        iter != m_lLabelStreams.end(); ++iter)
     {
         DWFCORE_FREE_OBJECT(*iter);
     }
 
     for (stream_list::iterator iter = m_lLayoutStreams.begin();
-        iter != m_lLayoutStreams.end(); iter++)
+        iter != m_lLayoutStreams.end(); ++iter)
     {
         DWFCORE_FREE_OBJECT(*iter);
     }
 
     for (stream_list::iterator iter = m_lLayoutLabelStreams.begin();
-        iter != m_lLayoutLabelStreams.end(); iter++)
+        iter != m_lLayoutLabelStreams.end(); ++iter)
     {
         DWFCORE_FREE_OBJECT(*iter);
     }

Modified: trunk/MgDev/Common/Renderers/EMapRenderer.cpp
===================================================================
--- trunk/MgDev/Common/Renderers/EMapRenderer.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/Renderers/EMapRenderer.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -163,7 +163,7 @@
     if (uiGraphics)
     {
         std::list<RS_UIGraphic>::iterator iter = uiGraphics->begin();
-        for (; iter != uiGraphics->end(); iter++)
+        for (; iter != uiGraphics->end(); ++iter)
         {
             // no need to correlate the UIGraphic object ID with any other object ID
             DWFUIGraphic* pGraphic = DWFCORE_ALLOC_OBJECT(
@@ -200,7 +200,7 @@
     //parents' uuids. This is done as post-processing step
     //so that we know all groups are defined first
     for (layerinfo_map::iterator iter = m_hGroups.begin();
-        iter != m_hGroups.end(); iter++)
+        iter != m_hGroups.end(); ++iter)
     {
         RS_LayerUIInfo layerinfo = iter->second;
 

Modified: trunk/MgDev/Common/Renderers/EMapUpdateRenderer.cpp
===================================================================
--- trunk/MgDev/Common/Renderers/EMapUpdateRenderer.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/Renderers/EMapUpdateRenderer.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -132,7 +132,7 @@
     objdefres_list::iterator oditer = m_lAttributeResources.begin();
     layerinfo_list::iterator iditer = m_lLayerInfos.begin();
     for (stream_list::iterator iter = m_lLayerStreams.begin();
-        iter != m_lLayerStreams.end(); iter++, iditer++, oditer++)
+        iter != m_lLayerStreams.end(); ++iter, ++iditer, ++oditer)
     {
         std::wstring layerid = (*iditer).guid();
         if (m_bFirst)
@@ -164,7 +164,7 @@
 
     iditer = m_lLayerInfos.begin();
     for (stream_list::iterator iter = m_lLabelStreams.begin();
-        iter != m_lLabelStreams.end(); iter++, iditer++)
+        iter != m_lLabelStreams.end(); ++iter, ++iditer)
     {
         if (*iter)
         {
@@ -549,7 +549,7 @@
     if (uiGraphics)
     {
         std::list<RS_UIGraphic>::iterator iter = uiGraphics->begin();
-        for (; iter != uiGraphics->end(); iter++)
+        for (; iter != uiGraphics->end(); ++iter)
         {
             // no need to correlate the UIGraphic object ID with any other object ID
             DWFUIGraphic* pGraphic = DWFCORE_ALLOC_OBJECT(

Modified: trunk/MgDev/Common/Renderers/EPlotRenderer.cpp
===================================================================
--- trunk/MgDev/Common/Renderers/EPlotRenderer.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/Renderers/EPlotRenderer.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -276,7 +276,7 @@
         //////////////////////////////////////////////////////////////////////
         objdefres_list::iterator oditer = m_lAttributeResources.begin();
         stream_list::iterator iter = m_lLayerStreams.begin();
-        for ( ; iter != m_lLayerStreams.end(); iter++, oditer++)
+        for ( ; iter != m_lLayerStreams.end(); iter++, ++oditer)
         {
             if (m_bFirst)
             {
@@ -311,7 +311,7 @@
         //////////////////////////////////////////////////////////////////////
 
         for (stream_list::iterator iter = m_lLabelStreams.begin();
-            iter != m_lLabelStreams.end(); iter++)
+            iter != m_lLabelStreams.end(); ++iter)
         {
             if (*iter)
             {
@@ -329,7 +329,7 @@
         //////////////////////////////////////////////////////////////////////
 
         for (stream_list::iterator iter = m_lLayoutStreams.begin();
-            iter != m_lLayoutStreams.end(); iter++)
+            iter != m_lLayoutStreams.end(); ++iter)
         {
             AddW2DResource( *iter,
                 NULL,
@@ -340,7 +340,7 @@
         }
 
         for (stream_list::iterator iter = m_lLayoutLabelStreams.begin();
-            iter != m_lLayoutLabelStreams.end(); iter++)
+            iter != m_lLayoutLabelStreams.end(); ++iter)
         {
             if (NULL != *iter)
             {
@@ -377,25 +377,25 @@
     //////////////////////////////////////////////////////////////////////
 
     for (stream_list::iterator iter = m_lLayerStreams.begin();
-        iter != m_lLayerStreams.end(); iter++)
+        iter != m_lLayerStreams.end(); ++iter)
     {
         m_lSectionStreams.push_back(*iter);
     }
 
     for (stream_list::iterator iter = m_lLabelStreams.begin();
-        iter != m_lLabelStreams.end(); iter++)
+        iter != m_lLabelStreams.end(); ++iter)
     {
         m_lSectionLabelStreams.push_back(*iter);
     }
 
     for (stream_list::iterator iter = m_lLayoutStreams.begin();
-        iter != m_lLayoutStreams.end(); iter++)
+        iter != m_lLayoutStreams.end(); ++iter)
     {
         m_lSectionLayoutStreams.push_back(*iter);
     }
 
     for (stream_list::iterator iter = m_lLayoutLabelStreams.begin();
-        iter != m_lLayoutLabelStreams.end(); iter++)
+        iter != m_lLayoutLabelStreams.end(); ++iter)
     {
         m_lSectionLayoutLabelStreams.push_back(*iter);
     }
@@ -453,25 +453,25 @@
     // now that we've created written out the map, we can clean up
     // all the streams
     for (stream_list::iterator iter = m_lSectionStreams.begin();
-        iter != m_lSectionStreams.end(); iter++)
+        iter != m_lSectionStreams.end(); ++iter)
     {
         DWFCORE_FREE_OBJECT ( *iter);
     }
 
     for (stream_list::iterator iter = m_lSectionLabelStreams.begin();
-        iter != m_lSectionLabelStreams.end(); iter++)
+        iter != m_lSectionLabelStreams.end(); ++iter)
     {
         DWFCORE_FREE_OBJECT ( *iter);
     }
 
     for (stream_list::iterator iter = m_lSectionLayoutStreams.begin();
-        iter != m_lSectionLayoutStreams.end(); iter++)
+        iter != m_lSectionLayoutStreams.end(); ++iter)
     {
         DWFCORE_FREE_OBJECT( *iter );
     }
 
     for (stream_list::iterator iter = m_lSectionLayoutLabelStreams.begin();
-        iter != m_lSectionLayoutLabelStreams.end(); iter++)
+        iter != m_lSectionLayoutLabelStreams.end(); ++iter)
     {
         DWFCORE_FREE_OBJECT( *iter );
     }

Modified: trunk/MgDev/Common/Renderers/FontManager.cpp
===================================================================
--- trunk/MgDev/Common/Renderers/FontManager.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/Renderers/FontManager.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -69,7 +69,7 @@
     AutoMutexLocker autoLocker(sm_mutex);
 
     // free up font map entries
-    for (FontMapIterator fmi = m_fontAliases.begin(); fmi != m_fontAliases.end(); fmi++)
+    for (FontMapIterator fmi = m_fontAliases.begin(); fmi != m_fontAliases.end(); ++fmi)
     {
         delete (*fmi).first;
         delete (*fmi).second;
@@ -433,7 +433,7 @@
     const wchar_t* fontname = sfontname.c_str();
 
     // if there is an alias for the font use that instead
-    for (FontMapIterator fmi = m_fontAliases.begin(); fmi != m_fontAliases.end(); fmi++)
+    for (FontMapIterator fmi = m_fontAliases.begin(); fmi != m_fontAliases.end(); ++fmi)
     {
         const wchar_t* alias = (*fmi).first->c_str();
         if (wcscmp(alias, fontname) == 0)

Modified: trunk/MgDev/Common/Renderers/KmlRenderer.cpp
===================================================================
--- trunk/MgDev/Common/Renderers/KmlRenderer.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/Renderers/KmlRenderer.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -106,7 +106,7 @@
     m_kmlContent = m_mainContent;
 
     //write out the features for each theme
-    for (ThemeMap::iterator iter = m_themeMap.begin(); iter != m_themeMap.end(); iter++)
+    for (ThemeMap::iterator iter = m_themeMap.begin(); iter != m_themeMap.end(); ++iter)
     {
         m_kmlContent->WriteString("<Folder>");
         m_kmlContent->WriteString("<name><![CDATA[", false);
@@ -242,7 +242,7 @@
             WriteElevationSettings();
             PolygonUtils::SORTEDRINGS rings;
             PolygonUtils::DetermineInteriorAndExteriorPolygons(lb, rings);
-            for (PolygonUtils::SORTEDRINGS::iterator sIter = rings.begin(); sIter != rings.end(); sIter++)
+            for (PolygonUtils::SORTEDRINGS::iterator sIter = rings.begin(); sIter != rings.end(); ++sIter)
             {
                 RingData* pRingData = sIter->second;
 
@@ -498,7 +498,7 @@
 
 void KmlRenderer::ClearThemes()
 {
-    for (ThemeMap::iterator iter = m_themeMap.begin(); iter != m_themeMap.end(); iter++)
+    for (ThemeMap::iterator iter = m_themeMap.begin(); iter != m_themeMap.end(); ++iter)
     {
         delete (*iter).second;
     }

Modified: trunk/MgDev/Common/Renderers/ObservationMesh.cpp
===================================================================
--- trunk/MgDev/Common/Renderers/ObservationMesh.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/Renderers/ObservationMesh.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -262,7 +262,7 @@
     int p0i=-1;
 
     for (std::map<int, std::vector<HullEdge> >::iterator iter = edges.begin();
-        iter != edges.end(); iter++)
+        iter != edges.end(); ++iter)
     {
         std::vector<HullEdge>& ei = iter->second;
         for (unsigned j=0; j<ei.size(); j++)

Modified: trunk/MgDev/Common/Stylization/Band.cpp
===================================================================
--- trunk/MgDev/Common/Stylization/Band.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/Stylization/Band.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -842,7 +842,11 @@
         if (memcmp(&fbottom, &m_nullValue, 4) == 0)
             fbottom = fcenter;
 #else
-    // Linux implementation
+        // TODO: Linux implementation
+        fleft = 0.0f;
+        fright = 0.0f;
+        ftop = 0.0f;
+        fbottom = 0.0f;
 #endif
 
         left = fleft;

Modified: trunk/MgDev/Common/Stylization/DefaultStylizer.cpp
===================================================================
--- trunk/MgDev/Common/Stylization/DefaultStylizer.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/Stylization/DefaultStylizer.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -525,7 +525,7 @@
     std::map<int, GeometryAdapter*>::iterator sgiter = m_hGeomStylizers.begin();
 
     // free the stylizer objects
-    for (; sgiter!=m_hGeomStylizers.end(); sgiter++)
+    for (; sgiter!=m_hGeomStylizers.end(); ++sgiter)
     {
         delete sgiter->second;
     }

Modified: trunk/MgDev/Common/Stylization/GeometryAdapter.cpp
===================================================================
--- trunk/MgDev/Common/Stylization/GeometryAdapter.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/Stylization/GeometryAdapter.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -38,7 +38,7 @@
 {
     // free up cached fdo filters
     for (std::map<const void*, FdoFilter*>::iterator iter = m_hFilterCache.begin();
-        iter != m_hFilterCache.end(); iter++)
+        iter != m_hFilterCache.end(); ++iter)
     {
         if (iter->second)
             iter->second->Release();
@@ -48,7 +48,7 @@
 
     // free up cached fdo expressions
     for (std::map<const void*, FdoExpression*>::iterator iter = m_hExpressionCache.begin();
-        iter != m_hExpressionCache.end(); iter++)
+        iter != m_hExpressionCache.end(); ++iter)
     {
         if (iter->second)
             iter->second->Release();

Modified: trunk/MgDev/Common/Stylization/LabelRenderer.h
===================================================================
--- trunk/MgDev/Common/Stylization/LabelRenderer.h	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/Stylization/LabelRenderer.h	2010-12-29 06:32:51 UTC (rev 5487)
@@ -30,7 +30,7 @@
 // of them on top of geometry in the end.
 struct LabelInfo
 {
-    LabelInfo(double x, double y, const RS_String& text, const RS_TextDef tdef)
+    LabelInfo(double x, double y, const RS_String& text, const RS_TextDef& tdef)
         : m_x(x),
           m_y(y),
           m_text(text),

Modified: trunk/MgDev/Common/Stylization/LabelRendererLocal.h
===================================================================
--- trunk/MgDev/Common/Stylization/LabelRendererLocal.h	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/Stylization/LabelRendererLocal.h	2010-12-29 06:32:51 UTC (rev 5487)
@@ -30,7 +30,7 @@
 // of them on top of geometry in the end.
 struct LabelInfoLocal
 {
-    LabelInfoLocal(double x, double y, const RS_String& text, const RS_TextDef tdef)
+    LabelInfoLocal(double x, double y, const RS_String& text, const RS_TextDef& tdef)
         : m_x(x),
           m_y(y),
           m_text(text),

Modified: trunk/MgDev/Common/Stylization/LineStyleDef.cpp
===================================================================
--- trunk/MgDev/Common/Stylization/LineStyleDef.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/Stylization/LineStyleDef.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -822,7 +822,7 @@
 
     // add the user-defined names
     CUSTOMSTYLES::iterator iter = s_customStyles.begin();
-    for (; iter != s_customStyles.end(); iter++)
+    for (; iter != s_customStyles.end(); ++iter)
     {
         std::wstring name = iter->first;
         names.push_back(name);

Modified: trunk/MgDev/Common/Stylization/PointAdapter.cpp
===================================================================
--- trunk/MgDev/Common/Stylization/PointAdapter.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/Stylization/PointAdapter.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -33,7 +33,7 @@
 {
     //free up cached point styles
     for (std::map<void*, RS_MarkerDef*>::iterator iter = m_hPointSymCache.begin();
-        iter != m_hPointSymCache.end(); iter++)
+        iter != m_hPointSymCache.end(); ++iter)
     {
         delete iter->second;
     }

Modified: trunk/MgDev/Common/Stylization/PolygonAdapter.cpp
===================================================================
--- trunk/MgDev/Common/Stylization/PolygonAdapter.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/Stylization/PolygonAdapter.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -33,7 +33,7 @@
 {
     //free up cached area styles
     for (std::map<void*, RS_FillStyle*>::iterator iter = m_hAreaSymCache.begin();
-        iter != m_hAreaSymCache.end(); iter++)
+        iter != m_hAreaSymCache.end(); ++iter)
     {
         delete iter->second;
     }

Modified: trunk/MgDev/Common/Stylization/PolygonUtils.cpp
===================================================================
--- trunk/MgDev/Common/Stylization/PolygonUtils.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/Stylization/PolygonUtils.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -43,7 +43,7 @@
 void PolygonUtils::Cleanup(SORTEDRINGS& rings)
 {
     // cleanup
-    for (SORTEDRINGS::iterator sIter = rings.begin(); sIter != rings.end(); sIter++)
+    for (SORTEDRINGS::iterator sIter = rings.begin(); sIter != rings.end(); ++sIter)
     {
         RingData* pRingData = sIter->second;
         delete pRingData;
@@ -157,7 +157,7 @@
     RINGVECTOR processedRings;
 
     // loop over the sorted list
-    for (SORTEDRINGS::iterator sIter = sortedRings.begin(); sIter != sortedRings.end(); sIter++)
+    for (SORTEDRINGS::iterator sIter = sortedRings.begin(); sIter != sortedRings.end(); ++sIter)
     {
         // ring A is the one we're going to process
         RingData* pRingDataA = sIter->second;

Modified: trunk/MgDev/Common/Stylization/PolylineAdapter.cpp
===================================================================
--- trunk/MgDev/Common/Stylization/PolylineAdapter.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/Stylization/PolylineAdapter.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -33,7 +33,7 @@
 {
     //free up cached line styles
     for (std::map<void*, RS_LineStroke*>::iterator iter = m_hLineSymCache.begin();
-        iter != m_hLineSymCache.end(); iter++)
+        iter != m_hLineSymCache.end(); ++iter)
     {
         delete iter->second;
     }

Modified: trunk/MgDev/Common/Stylization/SE_PositioningAlgorithms.cpp
===================================================================
--- trunk/MgDev/Common/Stylization/SE_PositioningAlgorithms.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/Stylization/SE_PositioningAlgorithms.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -779,8 +779,7 @@
     for (shieldIndex=0; shieldIndex<shieldCount; ++shieldIndex)
     {
         for (SE_RenderPrimitiveList::iterator iter = symbolVectors[shieldIndex].begin();
-             iter != symbolVectors[shieldIndex].end();
-             iter++)
+             iter != symbolVectors[shieldIndex].end(); ++iter)
         {
             // necessary since destructor of SE_RenderPrimitive is not virtual
             switch ((*iter)->type)

Modified: trunk/MgDev/Common/Stylization/SE_RenderProxies.h
===================================================================
--- trunk/MgDev/Common/Stylization/SE_RenderProxies.h	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/Stylization/SE_RenderProxies.h	2010-12-29 06:32:51 UTC (rev 5487)
@@ -186,7 +186,7 @@
 
     ~SE_RenderStyle()
     {
-        for (SE_RenderPrimitiveList::iterator iter = symbol.begin(); iter != symbol.end(); iter++)
+        for (SE_RenderPrimitiveList::iterator iter = symbol.begin(); iter != symbol.end(); ++iter)
         {
             // necessary since destructor of SE_RenderPrimitive is not virtual
             switch ((*iter)->type)
@@ -208,7 +208,8 @@
                     break;
 
                 default:
-                    throw; // means there is a bug
+                    _ASSERT(false); // means there is a bug
+                    break;
             }
         }
     }

Modified: trunk/MgDev/Common/Stylization/SE_SymbolDefProxies.cpp
===================================================================
--- trunk/MgDev/Common/Stylization/SE_SymbolDefProxies.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/Stylization/SE_SymbolDefProxies.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -65,7 +65,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 SE_Style::~SE_Style()
 {
-    for (SE_PrimitiveList::iterator iter = symbol.begin(); iter != symbol.end(); iter++)
+    for (SE_PrimitiveList::iterator iter = symbol.begin(); iter != symbol.end(); ++iter)
         delete *iter;
 
     delete rstyle;
@@ -590,7 +590,7 @@
         maxy0 = maxy1 = rs_max(ptAy, ptBy);
     }
 
-    for (SE_PrimitiveList::const_iterator src = symbol.begin(); src != symbol.end(); src++)
+    for (SE_PrimitiveList::const_iterator src = symbol.begin(); src != symbol.end(); ++src)
     {
         SE_Primitive* sym = *src;
 
@@ -688,7 +688,7 @@
         SE_Matrix totalxf(*ctx->xform);
         totalxf.premultiply(growxf);
 
-        for (SE_RenderPrimitiveList::iterator rs = rstyle->symbol.begin(); rs != rstyle->symbol.end(); rs++)
+        for (SE_RenderPrimitiveList::iterator rs = rstyle->symbol.begin(); rs != rstyle->symbol.end(); ++rs)
         {
             SE_RenderPrimitive* rsym = *rs;
             if (rsym->resizeControl == SE_ResizeControl_AdjustToResizeBox)

Modified: trunk/MgDev/Common/Stylization/SE_SymbolDefProxies.h
===================================================================
--- trunk/MgDev/Common/Stylization/SE_SymbolDefProxies.h	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/Stylization/SE_SymbolDefProxies.h	2010-12-29 06:32:51 UTC (rev 5487)
@@ -271,7 +271,7 @@
 
     ~SE_SymbolInstance()
     {
-        for (std::vector<SE_Style*>::iterator iter = styles.begin(); iter != styles.end(); iter++)
+        for (std::vector<SE_Style*>::iterator iter = styles.begin(); iter != styles.end(); ++iter)
             delete *iter;
 
         styles.clear();
@@ -294,7 +294,7 @@
         if (filter)
             filter->Release();
 
-        for (std::vector<SE_SymbolInstance*>::iterator iter = symbolInstances.begin(); iter != symbolInstances.end(); iter++)
+        for (std::vector<SE_SymbolInstance*>::iterator iter = symbolInstances.begin(); iter != symbolInstances.end(); ++iter)
             delete *iter;
 
         symbolInstances.clear();

Modified: trunk/MgDev/Common/Stylization/StylizationEngine.cpp
===================================================================
--- trunk/MgDev/Common/Stylization/StylizationEngine.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/Stylization/StylizationEngine.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -1357,7 +1357,7 @@
 {
     std::map<CompositeTypeStyle*, SE_Rule*>::iterator iter = m_rules.begin();
 
-    for (; iter != m_rules.end(); iter++)
+    for (; iter != m_rules.end(); ++iter)
         delete [] iter->second;
 
     m_rules.clear();

Modified: trunk/MgDev/Common/Stylization/StylizationUtil.cpp
===================================================================
--- trunk/MgDev/Common/Stylization/StylizationUtil.cpp	2010-12-28 02:17:46 UTC (rev 5486)
+++ trunk/MgDev/Common/Stylization/StylizationUtil.cpp	2010-12-29 06:32:51 UTC (rev 5487)
@@ -587,7 +587,7 @@
     // step 4 - re-evaluate and draw all the symbol instances
     //-------------------------------------------------------
 
-    for (std::vector<SE_SymbolInstance*>::const_iterator iter = symbolInstances.begin(); iter != symbolInstances.end(); iter++)
+    for (std::vector<SE_SymbolInstance*>::const_iterator iter = symbolInstances.begin(); iter != symbolInstances.end(); ++iter)
     {
         // one per symbol instance
         SE_SymbolInstance* sym = *iter;
@@ -641,7 +641,7 @@
         applyCtx.xform = &xform;
         applyCtx.sizeContext = sym->sizeContext;
 
-        for (std::vector<SE_Style*>::const_iterator siter = sym->styles.begin(); siter != sym->styles.end(); siter++)
+        for (std::vector<SE_Style*>::const_iterator siter = sym->styles.begin(); siter != sym->styles.end(); ++siter)
         {
             // have one style per simple symbol definition
             SE_Style* style = *siter;
@@ -768,7 +768,7 @@
     // step 5 - final clean up
     //-------------------------------------------------------
 
-    for (std::vector<SE_SymbolInstance*>::iterator iter = symbolInstances.begin(); iter != symbolInstances.end(); iter++)
+    for (std::vector<SE_SymbolInstance*>::iterator iter = symbolInstances.begin(); iter != symbolInstances.end(); ++iter)
         delete *iter;
 
     symbolInstances.clear();
@@ -796,7 +796,7 @@
 
     RS_Bounds fullBounds(DBL_MAX, DBL_MAX, -DBL_MAX, -DBL_MAX);
 
-    for (std::vector<SE_SymbolInstance*>::const_iterator iter = symbolInstances.begin(); iter != symbolInstances.end(); iter++)
+    for (std::vector<SE_SymbolInstance*>::const_iterator iter = symbolInstances.begin(); iter != symbolInstances.end(); ++iter)
     {
         // one per symbol instance
         SE_SymbolInstance* sym = *iter;
@@ -826,7 +826,7 @@
         evalCtx.xform = &xformScale;
         evalCtx.resources = sman;
 
-        for (std::vector<SE_Style*>::const_iterator siter = sym->styles.begin(); siter != sym->styles.end(); siter++)
+        for (std::vector<SE_Style*>::const_iterator siter = sym->styles.begin(); siter != sym->styles.end(); ++siter)
         {
             // have one style per simple symbol definition
             SE_Style* style = *siter;
@@ -962,7 +962,7 @@
     GetCompositeSymbolizationBoundsInternal(symbolInstances, pSERenderer, sman, exec, symBounds);
 
     // clean up
-    for (std::vector<SE_SymbolInstance*>::iterator iter = symbolInstances.begin(); iter != symbolInstances.end(); iter++)
+    for (std::vector<SE_SymbolInstance*>::iterator iter = symbolInstances.begin(); iter != symbolInstances.end(); ++iter)
         delete *iter;
 
     symbolInstances.clear();
@@ -989,7 +989,7 @@
     double mm2sud = pSERenderer->GetScreenUnitsPerMillimeterDevice();
     double mm2suw = pSERenderer->GetScreenUnitsPerMillimeterWorld();
 
-    for (std::vector<SE_SymbolInstance*>::const_iterator iter = symbolInstances.begin(); iter != symbolInstances.end(); iter++)
+    for (std::vector<SE_SymbolInstance*>::const_iterator iter = symbolInstances.begin(); iter != symbolInstances.end(); ++iter)
     {
         // one per symbol instance
         SE_SymbolInstance* sym = *iter;
@@ -1019,7 +1019,7 @@
         evalCtx.xform = &xformScale;
         evalCtx.resources = sman;
 
-        for (std::vector<SE_Style*>::const_iterator siter = sym->styles.begin(); siter != sym->styles.end(); siter++)
+        for (std::vector<SE_Style*>::const_iterator siter = sym->styles.begin(); siter != sym->styles.end(); ++siter)
         {
             // have one style per simple symbol definition
             SE_Style* style = *siter;



More information about the mapguide-commits mailing list