]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/htmltag.cpp
fix for toolbar radio buttons event generation
[wxWidgets.git] / src / html / htmltag.cpp
index a4227750253085872ba116c5569025bb54649228..85fa7286ee5bb4ad1dfd91fb14db3464f9bca16b 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "wx/html/htmltag.h"
 #include "wx/html/htmlpars.h"
+#include "wx/colour.h"
 #include <stdio.h> // for vsscanf
 #include <stdarg.h>
 
@@ -300,8 +301,14 @@ wxHtmlTag::wxHtmlTag(wxHtmlTag *parent,
 
 wxHtmlTag::~wxHtmlTag()
 {
-    for (wxHtmlTag *t = m_FirstChild; t; t = t->GetNextSibling())
-        delete t;
+    wxHtmlTag *t1, *t2;
+    t1 = m_FirstChild;
+    while (t1)
+    {
+        t2 = t1->GetNextSibling();
+        delete t1;
+        t1 = t2;
+    }
 }
 
 bool wxHtmlTag::HasParam(const wxString& par) const
@@ -325,7 +332,9 @@ wxString wxHtmlTag::GetParam(const wxString& par, bool with_commas) const
         return m_ParamValues[index];
 }
 
-int wxHtmlTag::ScanParam(const wxString& par, wxChar *format, void *param) const
+int wxHtmlTag::ScanParam(const wxString& par,
+                         const wxChar *format,
+                         void *param) const
 {
     wxString parval = GetParam(par);
     return wxSscanf(parval, format, param);
@@ -369,8 +378,9 @@ bool wxHtmlTag::GetParamAsColour(const wxString& par, wxColour *clr) const
         HTML_COLOUR("teal",    0x00,0x80,0x80)
         HTML_COLOUR("aqua",    0x00,0xFF,0xFF)
         #undef HTML_COLOUR
-        return FALSE;
     }
+
+    return FALSE;
 }
 
 bool wxHtmlTag::GetParamAsInt(const wxString& par, int *clr) const