[mapguide-commits] r7260 - trunk/MgDev/Common/Stylization

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Wed Dec 12 10:40:20 PST 2012


Author: waltweltonlair
Date: 2012-12-12 10:40:19 -0800 (Wed, 12 Dec 2012)
New Revision: 7260

Modified:
   trunk/MgDev/Common/Stylization/SE_StyleVisitor.cpp
Log:
[Submitted on behalf of Steven Xu. Reviewed by myself.]

This is a follow-up submission for ticket #2197 / changeset r7240.

Remove the assertions in the methods SE_StyleVisitor::ParseDouble and SE_StyleVisitor::ParseDoublePair
involving missing white-space before tags.  Existing files may contain geometry strings that have
missing white-space before tags, and so this case should be handled without asserting.


Modified: trunk/MgDev/Common/Stylization/SE_StyleVisitor.cpp
===================================================================
--- trunk/MgDev/Common/Stylization/SE_StyleVisitor.cpp	2012-12-12 05:30:47 UTC (rev 7259)
+++ trunk/MgDev/Common/Stylization/SE_StyleVisitor.cpp	2012-12-12 18:40:19 UTC (rev 7260)
@@ -179,22 +179,21 @@
             else
                 strTmp++;
         }
-#ifdef _DEBUG  // We shouldn't be here unless the geometry string is malformed.
+#ifdef _DEBUG
         else if (*strTmp == L',')
         {
-            // unexpected comma and ParseDoublePair should be used
+            // We shouldn't be here unless there is an unexpected comma and "ParseDoublePair" should be used.
             _ASSERT(false);
             quick_parse = false;
             break;
         }
+#endif
         else if (IsTag(*strTmp))
         {
-            // white-space must be missing
-            _ASSERT(false);
+            // We shouldn't be here unless white-space is missing, like "-0.571M -0.5,-0.2855"
             quick_parse = (buffer_len > 0);
             break;
         }
-#endif
         else
         {
             buffer[buffer_len] = *strTmp++;
@@ -297,15 +296,12 @@
             buffer_len = 0;
             strTmp++;
         }
-#ifdef _DEBUG  // We shouldn't be here unless the geometry string is malformed.
         else if (IsTag(*strTmp))
         {
-            // the white-space must be missing
-            _ASSERT(false);
+            // We shouldn't be here unless white-space is missing, like "0.485,-0.571M -0.5,-0.2855"
             quick_parse = (read_x && buffer_len > 0);
             break;
         }
-#endif
         else
         {
             buffer[buffer_len] = *strTmp++;



More information about the mapguide-commits mailing list