- 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()));