]> git.saurik.com Git - wxWidgets.git/commitdiff
Type casting warning fixes.
authorWłodzimierz Skiba <abx@abx.art.pl>
Thu, 15 Jul 2004 06:34:04 +0000 (06:34 +0000)
committerWłodzimierz Skiba <abx@abx.art.pl>
Thu, 15 Jul 2004 06:34:04 +0000 (06:34 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28245 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/richedit/wxllist.cpp
utils/tex2rtf/src/rtfutils.cpp
utils/tex2rtf/src/table.cpp
utils/tex2rtf/src/tex2rtf.cpp
utils/tex2rtf/src/texutils.cpp

index 89d04ce7f98c3fb16786cac7c6aa48346faa140b..8758ac8dcac049a999dc089f57b18c29d76c9738 100644 (file)
@@ -631,36 +631,36 @@ wxLayoutObjectCmd::Read(wxString &istr)
 
     if(obj->m_StyleInfo->m_fg_valid)
     {
 
     if(obj->m_StyleInfo->m_fg_valid)
     {
-        int red, green, blue;
+        unsigned char red, green, blue;
         ReadString(tmp, istr);
         tmp.ToLong(&l);
         ReadString(tmp, istr);
         tmp.ToLong(&l);
-        red = (int) l;
+        red = (unsigned char) l;
 
         ReadString(tmp, istr);
         tmp.ToLong(&l);
 
         ReadString(tmp, istr);
         tmp.ToLong(&l);
-        green = (int) l;
+        green = (unsigned char) l;
 
         ReadString(tmp, istr);
         tmp.ToLong(&l);
 
         ReadString(tmp, istr);
         tmp.ToLong(&l);
-        blue = (int) l;
+        blue = (unsigned char) l;
 
         obj->m_StyleInfo->m_fg = wxColour(red, green, blue);
     }
 
     if(obj->m_StyleInfo->m_bg_valid)
     {
 
         obj->m_StyleInfo->m_fg = wxColour(red, green, blue);
     }
 
     if(obj->m_StyleInfo->m_bg_valid)
     {
-        int red, green, blue;
+        unsigned char red, green, blue;
         ReadString(tmp, istr);
         tmp.ToLong(&l);
         ReadString(tmp, istr);
         tmp.ToLong(&l);
-        red = (int) l;
+        red = (unsigned char) l;
 
         ReadString(tmp, istr);
         tmp.ToLong(&l);
 
         ReadString(tmp, istr);
         tmp.ToLong(&l);
-        green = (int) l;
+        green = (unsigned char) l;
 
         ReadString(tmp, istr);
         tmp.ToLong(&l);
 
         ReadString(tmp, istr);
         tmp.ToLong(&l);
-        blue = (int) l;
+        blue = (unsigned char) l;
 
         obj->m_StyleInfo->m_bg = wxColour(red, green, blue);
     }
 
         obj->m_StyleInfo->m_bg = wxColour(red, green, blue);
     }
index 37b8fad4ec503cc1d8258fe6b39f1a1883dffe24..24f498ad4092566297fae99d420a27f30a9f19d0 100644 (file)
@@ -248,12 +248,12 @@ void WriteWinHelpContentsFileLine(wxChar *topicName, wxChar *xitle, int level)
       wxChar ch2=xitle[s+2]&0xff;
       wxChar ch3=xitle[s+3]&0xff;
       s+=4; // next character  
       wxChar ch2=xitle[s+2]&0xff;
       wxChar ch3=xitle[s+3]&0xff;
       s+=4; // next character  
-      if ((ch1==0x27)&&(ch2==0x66)&&(ch3==0x36)) { title[d++]='ö';  }
-      if ((ch1==0x27)&&(ch2==0x65)&&(ch3==0x34)) { title[d++]='ä';  }
-      if ((ch1==0x27)&&(ch2==0x66)&&(ch3==0x63)) { title[d++]='ü';  }
-      if ((ch1==0x27)&&(ch2==0x64)&&(ch3==0x36)) { title[d++]='Ö';  }
-      if ((ch1==0x27)&&(ch2==0x63)&&(ch3==0x34)) { title[d++]='Ä';  }
-      if ((ch1==0x27)&&(ch2==0x64)&&(ch3==0x63)) { title[d++]='Ü';  }
+      if ((ch1==0x27)&&(ch2==0x66)&&(ch3==0x36)) { title[d++]=_T('ö');  }
+      if ((ch1==0x27)&&(ch2==0x65)&&(ch3==0x34)) { title[d++]=_T('ä');  }
+      if ((ch1==0x27)&&(ch2==0x66)&&(ch3==0x63)) { title[d++]=_T('ü');  }
+      if ((ch1==0x27)&&(ch2==0x64)&&(ch3==0x36)) { title[d++]=_T('Ö');  }
+      if ((ch1==0x27)&&(ch2==0x63)&&(ch3==0x34)) { title[d++]=_T('Ä');  }
+      if ((ch1==0x27)&&(ch2==0x64)&&(ch3==0x63)) { title[d++]=_T('Ü');  }
     } else {
       title[d++]=ch;
       s++;
     } else {
       title[d++]=ch;
       s++;
index b289cdbe2d05b8a170e4b83ec32e7f00a1505beb..8fc61165cbb813b675e7e4e9160576827d7b7f3b 100644 (file)
@@ -122,7 +122,7 @@ bool ParseTableArgument(wxChar *value)
 
       while ((i < len) && (isdigit(ch) || ch == '.'))
       {
 
       while ((i < len) && (isdigit(ch) || ch == '.'))
       {
-        numberBuf[j] = ch;
+        numberBuf[j] = (wxChar)ch;
         j ++;
         i ++;
         ch = value[i];
         j ++;
         i ++;
         ch = value[i];
index e3b7b8ce4fafcd47650198c7b4bb9dbe740eb375..06778df3a9f2c5ac6f78795333649066ced86ee1 100644 (file)
@@ -66,7 +66,7 @@ static inline wxChar* copystring(const wxChar* s)
     { return wxStrcpy(new wxChar[wxStrlen(s) + 1], s); }
 #endif
 
     { return wxStrcpy(new wxChar[wxStrlen(s) + 1], s); }
 #endif
 
-const float versionNo = TEX2RTF_VERSION_NUMBER;
+const float versionNo = (float)TEX2RTF_VERSION_NUMBER;
 
 TexChunk *currentMember = NULL;
 bool startedSections = false;
 
 TexChunk *currentMember = NULL;
 bool startedSections = false;
@@ -287,8 +287,9 @@ bool MyApp::OnInit()
 #ifdef NO_GUI
       ShowOptions();
       exit(1);
 #ifdef NO_GUI
       ShowOptions();
       exit(1);
-#endif
+#else
       return false;
       return false;
+#endif
     }
   }
 
     }
   }
 
index 0f2c6385b5c02d19d5c9192a9515168783dd9db1..b4ad55afbba7e152753c5779b59316d90ef5806d 100644 (file)
@@ -117,7 +117,7 @@ void OutputChunkToString(TexChunk *chunk, wxChar *buf)
       buf[i] = 0;
     else
     {
       buf[i] = 0;
     else
     {
-      buf[i] = ch;
+      buf[i] = (wxChar)ch;
       i ++;
     }
   }
       i ++;
     }
   }
@@ -494,7 +494,7 @@ void ReadTexReferences(wxChar *filename)
 
 void BibEatWhiteSpace(wxSTD istream& str)
 {
 
 void BibEatWhiteSpace(wxSTD istream& str)
 {
-  char ch = str.peek();
+  char ch = (char)str.peek();
   
   while (!str.eof() && (ch == ' ' || ch == '\t' || ch == 13 || ch == 10 || ch == EOF))
   {
   
   while (!str.eof() && (ch == ' ' || ch == '\t' || ch == 13 || ch == 10 || ch == EOF))
   {
@@ -502,18 +502,18 @@ void BibEatWhiteSpace(wxSTD istream& str)
       BibLine ++;
     str.get(ch);
     if ((ch == EOF) || str.eof()) return;
       BibLine ++;
     str.get(ch);
     if ((ch == EOF) || str.eof()) return;
-    ch = str.peek();
+    ch = (char)str.peek();
   }
 
   // Ignore end-of-line comments
   if (ch == '%' || ch == ';' || ch == '#')
   {
     str.get(ch);
   }
 
   // Ignore end-of-line comments
   if (ch == '%' || ch == ';' || ch == '#')
   {
     str.get(ch);
-    ch = str.peek();
+    ch = (char)str.peek();
     while (ch != 10 && ch != 13 && !str.eof())
     {
       str.get(ch);
     while (ch != 10 && ch != 13 && !str.eof())
     {
       str.get(ch);
-      ch = str.peek();
+      ch = (char)str.peek();
     }
     BibEatWhiteSpace(str);
   }
     }
     BibEatWhiteSpace(str);
   }
@@ -524,14 +524,14 @@ void BibReadWord(wxSTD istream& istr, wxChar *buffer)
 {
   int i = 0;
   buffer[i] = 0;
 {
   int i = 0;
   buffer[i] = 0;
-  char ch = istr.peek();
+  char ch = (char)istr.peek();
   while (!istr.eof() && ch != ' ' && ch != '{' && ch != '(' && ch != 13 && ch != 10 && ch != '\t' &&
          ch != ',' && ch != '=')
   {
     istr.get(ch);
     buffer[i] = ch;
     i ++;
   while (!istr.eof() && ch != ' ' && ch != '{' && ch != '(' && ch != 13 && ch != 10 && ch != '\t' &&
          ch != ',' && ch != '=')
   {
     istr.get(ch);
     buffer[i] = ch;
     i ++;
-    ch = istr.peek();
+    ch = (char)istr.peek();
   }
   buffer[i] = 0;
 }
   }
   buffer[i] = 0;
 }
@@ -541,12 +541,12 @@ void BibReadToEOL(wxSTD istream& istr, wxChar *buffer)
 {
   int i = 0;
   buffer[i] = 0;
 {
   int i = 0;
   buffer[i] = 0;
-  char ch = istr.peek();
+  char ch = (char)istr.peek();
   bool inQuotes = false;
   if (ch == '"')
   {
     istr.get(ch);
   bool inQuotes = false;
   if (ch == '"')
   {
     istr.get(ch);
-    ch = istr.peek();
+    ch = (char)istr.peek();
     inQuotes = true;
   }
   // If in quotes, read white space too. If not,
     inQuotes = true;
   }
   // If in quotes, read white space too. If not,
@@ -558,7 +558,7 @@ void BibReadToEOL(wxSTD istream& istr, wxChar *buffer)
     istr.get(ch);
     buffer[i] = ch;
     i ++;
     istr.get(ch);
     buffer[i] = ch;
     i ++;
-    ch = istr.peek();
+    ch = (char)istr.peek();
   }
   if (ch == '"')
     istr.get(ch);
   }
   if (ch == '"')
     istr.get(ch);
@@ -572,7 +572,7 @@ void BibReadValue(wxSTD istream& istr, wxChar *buffer, bool ignoreBraces = true,
   int braceCount = 1;
   int i = 0;
   buffer[i] = 0;
   int braceCount = 1;
   int i = 0;
   buffer[i] = 0;
-  char ch = istr.peek();
+  char ch = (char)istr.peek();
   bool stopping = false;
   while (!istr.eof() && !stopping)
   {
   bool stopping = false;
   while (!istr.eof() && !stopping)
   {