From f624ceb7073e92463f2a85820caf429085ea087c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 28 Apr 2014 11:32:44 +0000 Subject: [PATCH] Fix problems due to using "%i" format with size_t in propgrid sample. Cast size_t value to int when passing it to "%i" format specifier as it has a different size on LP64 platforms. Closes #16213. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76423 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/propgrid/tests.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/samples/propgrid/tests.cpp b/samples/propgrid/tests.cpp index b83ca06806..2f3b63423d 100644 --- a/samples/propgrid/tests.cpp +++ b/samples/propgrid/tests.cpp @@ -1229,7 +1229,7 @@ bool FormMain::RunTests( bool fullTest, bool interactive ) wxPGProperty* p = arr1[i]; page->HideProperty(p, true); - wxString s = wxString::Format(wxT("HideProperty(%i, %s)"), i, p->GetLabel().c_str()); + wxString s = wxString::Format(wxT("HideProperty(%i, %s)"), (int)i, p->GetLabel().c_str()); RT_VALIDATE_VIRTUAL_HEIGHT(page, s) if ( _failed_ ) break; @@ -1245,7 +1245,7 @@ bool FormMain::RunTests( bool fullTest, bool interactive ) wxPGProperty* p = arr2[i]; page->HideProperty(p, false); - wxString s = wxString::Format(wxT("ShowProperty(%i, %s)"), i, p->GetLabel().c_str()); + wxString s = wxString::Format(wxT("ShowProperty(%i, %s)"), (int)i, p->GetLabel().c_str()); RT_VALIDATE_VIRTUAL_HEIGHT(page, s) if ( _failed_ ) break; @@ -1263,7 +1263,7 @@ bool FormMain::RunTests( bool fullTest, bool interactive ) wxPGProperty* p = arr1[i]; page->HideProperty(p, true); - wxString s = wxString::Format(wxT("HideProperty(%i, %s)"), i, p->GetLabel().c_str()); + wxString s = wxString::Format(wxT("HideProperty(%i, %s)"), (int)i, p->GetLabel().c_str()); RT_VALIDATE_VIRTUAL_HEIGHT(page, s) if ( _failed_ ) break; @@ -1279,7 +1279,7 @@ bool FormMain::RunTests( bool fullTest, bool interactive ) wxPGProperty* p = arr2[i]; page->HideProperty(p, false); - wxString s = wxString::Format(wxT("ShowProperty(%i, %s)"), i, p->GetLabel().c_str()); + wxString s = wxString::Format(wxT("ShowProperty(%i, %s)"), (int)i, p->GetLabel().c_str()); RT_VALIDATE_VIRTUAL_HEIGHT(page, s) if ( _failed_ ) break; @@ -1298,7 +1298,7 @@ bool FormMain::RunTests( bool fullTest, bool interactive ) wxPGProperty* p = arr1[i]; page->HideProperty(p, true); - wxString s = wxString::Format(wxT("HideProperty(%i, %s)"), i, p->GetLabel().c_str()); + wxString s = wxString::Format(wxT("HideProperty(%i, %s)"), (int)i, p->GetLabel().c_str()); RT_VALIDATE_VIRTUAL_HEIGHT(page, s) if ( _failed_ ) break; @@ -1314,7 +1314,7 @@ bool FormMain::RunTests( bool fullTest, bool interactive ) wxPGProperty* p = arr2[i]; page->HideProperty(p, false); - wxString s = wxString::Format(wxT("ShowProperty(%i, %s)"), i, p->GetLabel().c_str()); + wxString s = wxString::Format(wxT("ShowProperty(%i, %s)"), (int)i, p->GetLabel().c_str()); RT_VALIDATE_VIRTUAL_HEIGHT(page, s) if ( _failed_ ) break; @@ -1334,7 +1334,7 @@ bool FormMain::RunTests( bool fullTest, bool interactive ) // FIXME: Does not display changes. for ( i=3; i<12; i+=2 ) { - RT_MSG(wxString::Format(wxT("%i columns"),i)); + RT_MSG(wxString::Format(wxT("%i columns"),(int)i)); CreateGrid( -1, -1 ); pgman = m_pPropGridManager; pgman->SetColumnCount(i);