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:
Blake Eryx
2018-11-01 19:32:02 -04:00
committed by Vadim Zeitlin
parent 63c602c3d2
commit 65827a0572
51 changed files with 260 additions and 260 deletions

View File

@@ -735,7 +735,7 @@ MyPanel::MyPanel(wxWindow *parent)
wxString date;
date.Printf("Selected date: %s",
wxDateTime::Today().FormatISODate().c_str());
wxDateTime::Today().FormatISODate());
m_date = new wxStaticText(this, wxID_ANY, date);
m_calendar = DoCreateCalendar(wxDefaultDateTime,
wxCAL_SHOW_HOLIDAYS);
@@ -761,13 +761,13 @@ void MyPanel::OnCalendar(wxCalendarEvent& event)
m_calendar->Mark(event.GetDate().GetDay(), mark);
wxLogMessage("Selected (and %smarked) %s from calendar.",
mark ? "" : "un", s_dateLast.FormatISODate().c_str());
mark ? "" : "un", s_dateLast.FormatISODate());
}
void MyPanel::OnCalendarChange(wxCalendarEvent& event)
{
wxString s;
s.Printf("Selected date: %s", event.GetDate().FormatISODate().c_str());
s.Printf("Selected date: %s", event.GetDate().FormatISODate());
m_date->SetLabel(s);
wxLogStatus(s);
@@ -783,7 +783,7 @@ void MyPanel::OnCalMonthChange(wxCalendarEvent& event)
void MyPanel::OnCalendarWeekDayClick(wxCalendarEvent& event)
{
wxLogMessage("Clicked on %s",
wxDateTime::GetWeekDayName(event.GetWeekDay()).c_str());
wxDateTime::GetWeekDayName(event.GetWeekDay()));
}
void MyPanel::OnCalendarWeekClick(wxCalendarEvent& event)