X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7a0079d5a4d1fe6e80cc978d84648fa7bf6fde4a..6f026b5b63fe7ccb025e84509886f74772b9df13:/src/generic/helpext.cpp?ds=sidebyside diff --git a/src/generic/helpext.cpp b/src/generic/helpext.cpp index 4f1f2543c4..af4644ad85 100644 --- a/src/generic/helpext.cpp +++ b/src/generic/helpext.cpp @@ -4,7 +4,6 @@ // Author: Karsten Ballueder // Modified by: // Created: 04/01/98 -// RCS-ID: $Id$ // Copyright: (c) Karsten Ballueder // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -134,12 +133,12 @@ bool wxExtHelpController::DisplayHelp(const wxString &relativeURL) class wxExtHelpMapEntry : public wxObject { public: - int id; + int entryid; wxString url; wxString doc; wxExtHelpMapEntry(int iid, wxString const &iurl, wxString const &idoc) - { id = iid; url = iurl; doc = idoc; } + { entryid = iid; url = iurl; doc = idoc; } }; void wxExtHelpController::DeleteList() @@ -154,8 +153,7 @@ void wxExtHelpController::DeleteList() node = m_MapList->GetFirst(); } - delete m_MapList; - m_MapList = NULL; + wxDELETE(m_MapList); } } @@ -326,7 +324,7 @@ bool wxExtHelpController::DisplayContents() while (node) { entry = (wxExtHelpMapEntry *)node->GetData(); - if (entry->id == WXEXTHELP_CONTENTS_ID) + if (entry->entryid == WXEXTHELP_CONTENTS_ID) { contents = entry->url; break; @@ -340,7 +338,7 @@ bool wxExtHelpController::DisplayContents() file << m_helpDir << wxFILE_SEP_PATH << contents; if (file.Contains(wxT('#'))) file = file.BeforeLast(wxT('#')); - if (contents.length() && wxFileExists(file)) + if ( wxFileExists(file) ) rc = DisplaySection(WXEXTHELP_CONTENTS_ID); // if not found, open homemade toc: @@ -358,7 +356,7 @@ bool wxExtHelpController::DisplaySection(int sectionNo) while (node) { entry = (wxExtHelpMapEntry *)node->GetData(); - if (entry->id == sectionNo) + if (entry->entryid == sectionNo) return DisplayHelp(entry->url); node = node->GetNext(); }