]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/helpdata.cpp
correcting CGImage handling to be always correctly initialized and freed on OSX build...
[wxWidgets.git] / src / html / helpdata.cpp
index 9d5e70638d25f088ad42b2cc55609d58069969f6..9aa5f8d1b9c37986da25969afde2da223a6adf92 100644 (file)
@@ -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"
 
@@ -466,17 +462,17 @@ bool wxHtmlHelpData::SaveCachedBook(wxHtmlBookRecord *book, wxOutputStream *f)
         }
         else
         {
-            int cnt = 0;
+            int cnt2 = 0;
             wxHtmlHelpDataItem *parent = m_index[i].parent;
             for (int j = i-1; j >= 0; j--)
             {
                 if (m_index[j].book == book && m_index[j].level > 0)
-                    cnt++;
+                    cnt2++;
                 if (&m_index[j] == parent)
                     break;
             }
-            wxASSERT(cnt > 0);
-            CacheWriteInt32(f, cnt);
+            wxASSERT(cnt2 > 0);
+            CacheWriteInt32(f, cnt2);
         }
     }
     return true;
@@ -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());