From: Vadim Zeitlin Date: Fri, 15 Feb 2013 12:40:20 +0000 (+0000) Subject: Don't use ternary operator ?: with wxString and literal strings. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/35f6f71b19d8c2f714fa8600322470367cb7b4c6 Don't use ternary operator ?: with wxString and literal strings. This results in warnings about converting string literal to (non const) C string. Also remove the now unneeded calls to c_str() inside wxString::Printf(). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73520 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/unix/fontutil.cpp b/src/unix/fontutil.cpp index 07ee3233f2..883fbd7feb 100644 --- a/src/unix/fontutil.cpp +++ b/src/unix/fontutil.cpp @@ -989,9 +989,9 @@ bool wxTestFontEncoding(const wxNativeEncodingInfo& info) { wxString fontspec; fontspec.Printf(wxT("-*-%s-*-*-*-*-*-*-*-*-*-*-%s-%s"), - !info.facename ? wxT("*") : info.facename.c_str(), - info.xregistry.c_str(), - info.xencoding.c_str()); + info.facename.empty() ? wxString("*") : info.facename, + info.xregistry, + info.xencoding); return wxTestFontSpec(fontspec); }