Small clean up in wxX11 Pango code.
Don't use unnecessary explicit casts of wxCharBuffer to "const char *". Use wxCharBuffer::length() instead of strlen(). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65656 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1571,7 +1571,7 @@ void wxWindowDCImpl::DoDrawText( const wxString &text, wxCoord x, wxCoord y )
|
||||
pango_layout_set_font_description(layout, m_fontdesc);
|
||||
|
||||
const wxCharBuffer data = wxConvUTF8.cWC2MB( text );
|
||||
pango_layout_set_text(layout, (const char*) data, strlen( (const char*) data ));
|
||||
pango_layout_set_text(layout, data, data.length());
|
||||
|
||||
// Measure layout.
|
||||
int w,h;
|
||||
@@ -1676,7 +1676,7 @@ void wxWindowDCImpl::DoGetTextExtent( const wxString &string, wxCoord *width, wx
|
||||
pango_layout_set_font_description(layout, m_fontdesc);
|
||||
|
||||
const wxCharBuffer data = wxConvUTF8.cWC2MB( string );
|
||||
pango_layout_set_text(layout, (const char*) data, strlen( (const char*) data ));
|
||||
pango_layout_set_text(layout, data, data.length());
|
||||
|
||||
// Measure text.
|
||||
int w,h;
|
||||
|
Reference in New Issue
Block a user