X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/04dbb6467be8f564f380bd9a1106fbdecbd26a98..0122b7e3fcfd78f879470053c91a60e3c66537a3:/src/html/m_layout.cpp?ds=sidebyside diff --git a/src/html/m_layout.cpp b/src/html/m_layout.cpp index edb2bd28f4..e828f01e1d 100644 --- a/src/html/m_layout.cpp +++ b/src/html/m_layout.cpp @@ -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;