Use clear() instead of assignment to wxEmptyString

This commit is contained in:
Paul Cornett
2018-08-22 09:45:20 -07:00
parent f4bcb12709
commit 86ab6de0c1
7 changed files with 21 additions and 15 deletions

View File

@@ -310,7 +310,9 @@ void wxHtmlWindow::Init()
#endif // wxUSE_STATUSBAR
m_RelatedFrame = NULL;
m_TitleFormat = wxT("%s");
m_OpenedPage = m_OpenedAnchor = m_OpenedPageTitle = wxEmptyString;
m_OpenedPage.clear();
m_OpenedAnchor.clear();
m_OpenedPageTitle.clear();
m_Cell = NULL;
m_Parser = new wxHtmlWinParser(this);
m_Parser->SetFS(m_FS);
@@ -433,7 +435,9 @@ void wxHtmlWindow::SetStandardFonts(int size,
bool wxHtmlWindow::SetPage(const wxString& source)
{
m_OpenedPage = m_OpenedAnchor = m_OpenedPageTitle = wxEmptyString;
m_OpenedPage.clear();
m_OpenedAnchor.clear();
m_OpenedPageTitle.clear();
return DoSetPage(source);
}
@@ -853,7 +857,7 @@ bool wxHtmlWindow::HistoryForward()
if (m_HistoryPos == -1) return false;
if (m_HistoryPos >= (int)m_History->GetCount() - 1)return false;
m_OpenedPage = wxEmptyString; // this will disable adding new entry into history in LoadPage()
m_OpenedPage.clear(); // this will disable adding new entry into history in LoadPage()
m_HistoryPos++;
l = (*m_History)[m_HistoryPos].GetPage();