]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/m_pre.cpp
fix for unicode build
[wxWidgets.git] / src / html / m_pre.cpp
index 27fa27a31a110695632a275ad28095f541dea5e1..76090c9398da94813f72e1aae9d20f5643452369 100644 (file)
@@ -7,7 +7,7 @@
 // Licence:     wxWindows Licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #pragma implementation
 #endif
 
@@ -35,8 +35,8 @@ FORCE_LINK_ME(m_pre)
 static wxString LINKAGEMODE HtmlizeWhitespaces(const wxString& str)
 {
     wxString out;
-    size_t i = 0, j = 0, len = str.Len();
-    for (i = 0; i < len; i++)
+    size_t len = str.Len();
+    for (size_t i = 0; i < len; i++)
     {
         switch (str[i])
         {
@@ -52,7 +52,10 @@ static wxString LINKAGEMODE HtmlizeWhitespaces(const wxString& str)
                 out << wxT("<br>");
                 break;
             case wxT('\t'):
-                for (j = 8 - i%8; j > 0; j--) out << wxT("&nbsp;");
+                {
+                    for (size_t j = 8 - i%8; j > 0; j--)
+                        out << wxT("&nbsp;");
+                }
                 break;
             default:
                 out << str[i];