fixed ugly stupid piece of code

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11097 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík 2001-07-18 23:01:43 +00:00
parent 00393283ff
commit 9eeca6dfe8

View File

@ -154,11 +154,9 @@ TAG_HANDLER_BEGIN(TITLE, "TITLE")
wxHtmlWindow *wfr = (wxHtmlWindow*)(m_WParser->GetWindow()); wxHtmlWindow *wfr = (wxHtmlWindow*)(m_WParser->GetWindow());
if (wfr) if (wfr)
{ {
wxString title = ""; const wxString& src = *m_WParser->GetSource();
wxString *src = m_WParser->GetSource(); wfr->OnSetTitle(src.Mid(tag.GetBeginPos(),
tag.GetEndPos1()-tag.GetBeginPos()));
for (int i = tag.GetBeginPos(); i < tag.GetEndPos1(); i++) title += (*src)[(unsigned int) i];
wfr->OnSetTitle(title);
} }
} }
return TRUE; return TRUE;