Remove unnecessary c_str() calls from the samples
Pass wxStrings directly to wxString::Format("%s") and similar
pseudo-vararg functions, there is no need for c_str() there since
wxWidgets 2.9.
Closes https://github.com/wxWidgets/wxWidgets/pull/1009
This commit is contained in:
committed by
Vadim Zeitlin
parent
63c602c3d2
commit
65827a0572
@@ -361,7 +361,7 @@ void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
|
||||
wxString canname = m_locale.GetCanonicalName();
|
||||
|
||||
localeInfo.Printf(_("Language: %s\nSystem locale name: %s\nCanonical locale name: %s\n"),
|
||||
locale.c_str(), sysname.c_str(), canname.c_str() );
|
||||
locale, sysname, canname );
|
||||
|
||||
wxMessageDialog dlg(
|
||||
this,
|
||||
@@ -445,17 +445,17 @@ void MyFrame::OnTestLocaleAvail(wxCommandEvent& WXUNUSED(event))
|
||||
const wxLanguageInfo * const info = wxLocale::FindLanguageInfo(s_locale);
|
||||
if ( !info )
|
||||
{
|
||||
wxLogError(_("Locale \"%s\" is unknown."), s_locale.c_str());
|
||||
wxLogError(_("Locale \"%s\" is unknown."), s_locale);
|
||||
return;
|
||||
}
|
||||
|
||||
if ( wxLocale::IsAvailable(info->Language) )
|
||||
{
|
||||
wxLogMessage(_("Locale \"%s\" is available."), s_locale.c_str());
|
||||
wxLogMessage(_("Locale \"%s\" is available."), s_locale);
|
||||
}
|
||||
else
|
||||
{
|
||||
wxLogWarning(_("Locale \"%s\" is not available."), s_locale.c_str());
|
||||
wxLogWarning(_("Locale \"%s\" is not available."), s_locale);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user