]> git.saurik.com Git - wxWidgets.git/blobdiff - src/x11/dcclient.cpp
use UTF8-encoded char* strings in UTF8 build instead of wchar_t* if the current local...
[wxWidgets.git] / src / x11 / dcclient.cpp
index d4fa32eb392413ed515c4622cfdf9187800ef3e7..cd0ed5f6a34fad0600becfdc9cf26082345c1fdd 100644 (file)
@@ -1563,7 +1563,7 @@ void wxWindowDC::DoDrawText( const wxString &text, wxCoord x, wxCoord y )
         slen = strlen(text);
         XCharStruct overall_return;
 
-        (void)XTextExtents(xfont, (char*) text.c_str(), slen, &direction,
+        (void)XTextExtents(xfont, (const char*) text.c_str(), slen, &direction,
                                  &ascent, &descent, &overall_return);
 
         cx = overall_return.width;
@@ -1612,7 +1612,7 @@ void wxWindowDC::DoDrawRotatedText( const wxString &text, wxCoord x, wxCoord y,
 
 void wxWindowDC::DoGetTextExtent( const wxString &string, wxCoord *width, wxCoord *height,
                                 wxCoord *descent, wxCoord *externalLeading,
-                                wxFont *font ) const
+                                const wxFont *font ) const
 {
     wxCHECK_RET( Ok(), wxT("invalid dc") );
 
@@ -1661,7 +1661,7 @@ void wxWindowDC::DoGetTextExtent( const wxString &string, wxCoord *width, wxCoor
     int direction, ascent, descent2;
     XCharStruct overall;
 
-    XTextExtents( xfont, (char*) string.c_str(), string.length(), &direction,
+    XTextExtents( xfont, (const char*) string.c_str(), string.length(), &direction,
         &ascent, &descent2, &overall);
 
     if (width)
@@ -1779,8 +1779,6 @@ void wxWindowDC::SetFont( const wxFont &font )
 
     m_font = font;
 
-    return;
-
 #if wxUSE_UNICODE
     m_fontdesc = font.GetNativeFontInfo()->description;
 #endif