From 9eeca6dfe8f5e2cf5ea3f2aeef445de86d80beb3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Wed, 18 Jul 2001 23:01:43 +0000 Subject: [PATCH] fixed ugly stupid piece of code git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11097 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/html/m_layout.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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; -- 2.45.2