X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7fbe5489ad278f89ba20788310fe0db9f0647898..3b96fc2f1b64f78bba7c755a5c14f618962f696b:/src/html/helpdata.cpp diff --git a/src/html/helpdata.cpp b/src/html/helpdata.cpp index 327cc5fa4e..de2498063f 100644 --- a/src/html/helpdata.cpp +++ b/src/html/helpdata.cpp @@ -9,10 +9,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "helpdata.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -82,7 +78,7 @@ wxHtmlHelpIndexCompareFunc(wxHtmlHelpDataItem **a, wxHtmlHelpDataItem **b) return -1; if (ib == NULL) return 1; - + if (ia->parent == ib->parent) { return ia->name.CmpNoCase(ib->name); @@ -686,7 +682,7 @@ bool wxHtmlHelpData::AddBook(const wxString& book) lineptr = ReadLine(lineptr, linebuf, 300); for (wxChar *ch = linebuf; *ch != wxT('\0') && *ch != wxT('='); ch++) - *ch = tolower(*ch); + *ch = (wxChar)wxTolower(*ch); if (wxStrstr(linebuf, _T("title=")) == linebuf) title = linebuf + wxStrlen(_T("title=")); @@ -700,9 +696,11 @@ bool wxHtmlHelpData::AddBook(const wxString& book) charset = linebuf + wxStrlen(_T("charset=")); } while (lineptr != NULL); - wxFontEncoding enc; - if (charset == wxEmptyString) enc = wxFONTENCODING_SYSTEM; - else enc = wxFontMapper::Get()->CharsetToEncoding(charset); + wxFontEncoding enc = wxFONTENCODING_SYSTEM; +#if wxUSE_FONTMAP + if (charset != wxEmptyString) + enc = wxFontMapper::Get()->CharsetToEncoding(charset); +#endif bool rtval = AddBookParam(*fi, enc, title, contents, index, start, fsys.GetPath());