Fix -Wwrite-strings warning in non-Pango wxFontEnumerator code

Don't convert wxString::c_str() to decltype(wxT("*")), which is
non-const "wchar_t *". Just pass wxString to Printf() directly instead,
this is simpler and more efficient anyhow.
This commit is contained in:
Vadim Zeitlin 2020-07-06 12:57:14 +02:00
parent e7bb37436a
commit 698c356050

View File

@ -282,7 +282,7 @@ bool wxFontEnumerator::EnumerateEncodings(const wxString& family)
#else
wxString pattern;
pattern.Printf(wxT("-*-%s-*-*-*-*-*-*-*-*-*-*-*-*"),
family.empty() ? wxT("*") : family.c_str());
family.empty() ? wxString("*") : family);
// get the list of all fonts
int nFonts;