Fix format specifiers used for event logging in the listctrl sample.

Don't use "%ld" for int argument (this is harmless but unnecessary) and cast
wxUIntPtr to long before using it with "%ld" as otherwise its size is greater
than that of long in Win64 builds.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75145 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2013-11-09 13:31:16 +00:00
parent 29f73fbd10
commit ba58db15e8

View File

@@ -1305,9 +1305,9 @@ void MyListCtrl::OnRightClick(wxMouseEvent& event)
void MyListCtrl::LogEvent(const wxListEvent& event, const wxChar *eventName)
{
wxLogMessage(wxT("Item %ld: %s (item text = %s, data = %ld)"),
wxLogMessage(wxT("Item %d: %s (item text = %s, data = %ld)"),
event.GetIndex(), eventName,
event.GetText().c_str(), event.GetData());
event.GetText(), static_cast<long>(event.GetData()));
}
wxString MyListCtrl::OnGetItemText(long item, long column) const