compiling app with unsigned char breaks wx/mimetype.h in 2.8.0rc1

Alicia da Conceicao alicia454 at gmail.com
Fri Nov 24 02:48:12 PST 2006


> I simply don't have time to do the required (trivial) changes myself and to
> test them. As you seem to feel strongly about it, I encourage you to try to
> do it yourself and submit us a patch for this.

Hi VZ:

Below is a very trivial 1 line patch for "mimetype.h" that does the trick!
With it I can compile all of my user applications using the unsigned-char
options for the C/C++ compilers.  From what I can tell, the "+"
overloaded operator for wxString had difficulties with the wxT macro,
which that context should output a wxChar, so by explicitly casting it,
the problem went away.

I would appreciately your assistance submitting this patch, since I
am not familar with patch submission procedure.  I hope that this
patch can match it into the 2.8.0rc2 release.

Thanks in advance,
Alicia.

===========================================
--- include/wx/mimetype.h.orig  Mon Nov 13 10:50:54 2006
+++ include/wx/mimetype.h       Fri Nov 24 05:25:20 2006
@@ -133,7 +133,7 @@ public:
     // get a "verb=command" string
     wxString GetVerbCmd(size_t n) const
     {
-        return m_verbs[n] + wxT('=') + m_commands[n];
+        return m_verbs[n] + ((wxChar) wxT('=')) + m_commands[n];
     }

 private:

===========================================




More information about the wx-users mailing list