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;
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") );
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)
m_font = font;
- return;
-
#if wxUSE_UNICODE
m_fontdesc = font.GetNativeFontInfo()->description;
#endif