]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/m_layout.cpp
added bmpbase.cpp (forgotten during merge?)
[wxWidgets.git] / src / html / m_layout.cpp
index edb2bd28f493660b4bd85649a8a91d9ca801cd15..e828f01e1ddc6ac0a7ede27b8782fdea18b73265 100644 (file)
@@ -154,11 +154,9 @@ TAG_HANDLER_BEGIN(TITLE, "TITLE")
             wxHtmlWindow *wfr = (wxHtmlWindow*)(m_WParser->GetWindow());
             if (wfr)
             {
-                wxString title = "";
-                wxString *src = m_WParser->GetSource();
-
-                for (int i = tag.GetBeginPos(); i < tag.GetEndPos1(); i++) title += (*src)[(unsigned int) i];
-                wfr->OnSetTitle(title);
+                const wxString& src = *m_WParser->GetSource();
+                wfr->OnSetTitle(src.Mid(tag.GetBeginPos(), 
+                                        tag.GetEndPos1()-tag.GetBeginPos()));
             }
         }
         return TRUE;