]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xml/xml.cpp
Cast needed to fix compilation on 10.4 --This line, and those below,
[wxWidgets.git] / src / xml / xml.cpp
index 0193e5a8591c9ae56702c1394215f6a42e9b31d7..0f5e61d83cc943082540b8aeb504f6fd88a618f3 100644 (file)
@@ -29,7 +29,7 @@
 #include "wx/datstrm.h"
 #include "wx/zstream.h"
 #include "wx/strconv.h"
-#include "wx/ptr_scpd.h"
+#include "wx/scopedptr.h"
 
 #include "expat.h" // from Expat
 
@@ -825,10 +825,11 @@ bool OutputStringEnt(wxOutputStream& stream,
     {
         wxChar c = str.GetChar(i);
         if (c == wxS('<') || c == wxS('>') ||
-            (c == wxS('&') && str.Mid(i+1, 4) != wxS("amp;")) ||
+            (c == wxS('&') && str.substr(i+1, 4) != wxS("amp;")) ||
             ((flags & XML_ESCAPE_QUOTES) && c == wxS('"')))
         {
-            if ( !OutputString(stream, str.substr(last, i), convMem, convFile) )
+            if ( !OutputString(stream, str.substr(last, i - last),
+                               convMem, convFile) )
                 return false;
 
             const char *escaped;
@@ -858,7 +859,7 @@ bool OutputStringEnt(wxOutputStream& stream,
         }
     }
 
-    return OutputString(stream, str.substr(last, i), convMem, convFile);
+    return OutputString(stream, str.substr(last, i - last), convMem, convFile);
 }
 
 bool OutputIndentation(wxOutputStream& stream,