Fix mismatches between format strings and arguments.
This corrects the asserts which are now triggered when the actual arguments don't match the format string. Closes #12265. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65054 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -764,7 +764,7 @@ void MyCanvas::DrawText(wxDC& dc)
|
||||
wxCoord height;
|
||||
wxCoord descent;
|
||||
dc.GetTextExtent( wxT("This is Swiss 18pt text."), &length, &height, &descent );
|
||||
text.Printf( wxT("Dimensions are length %ld, height %ld, descent %ld"), length, height, descent );
|
||||
text.Printf( wxT("Dimensions are length %d, height %d, descent %d"), length, height, descent );
|
||||
dc.DrawText( text, 110, 80 );
|
||||
|
||||
text.Printf( wxT("CharHeight() returns: %d"), dc.GetCharHeight() );
|
||||
|
@@ -1004,7 +1004,7 @@ bool wxAuiManager::AddPane(wxWindow* window, const wxAuiPaneInfo& pane_info)
|
||||
if (pinfo.name.empty() || already_exists)
|
||||
{
|
||||
pinfo.name.Printf(wxT("%08lx%08x%08x%08lx"),
|
||||
wxPtrToUInt(pinfo.window) & 0xffffffff,
|
||||
(unsigned long)(wxPtrToUInt(pinfo.window) & 0xffffffff),
|
||||
(unsigned int)time(NULL),
|
||||
#ifdef __WXWINCE__
|
||||
(unsigned int)GetTickCount(),
|
||||
|
@@ -586,7 +586,8 @@ static wxString FileToCppArray(wxString filename, int num)
|
||||
wxT("Huge file not supported") );
|
||||
|
||||
snum.Printf(wxT("%i"), num);
|
||||
output.Printf(wxT("static size_t xml_res_size_") + snum + wxT(" = %zu;\n"), lng);
|
||||
output.Printf(wxT("static size_t xml_res_size_") + snum + wxT(" = %lu;\n"),
|
||||
static_cast<unsigned long>(lng));
|
||||
output += wxT("static unsigned char xml_res_file_") + snum + wxT("[] = {\n");
|
||||
// we cannot use string literals because MSVC is dumb wannabe compiler
|
||||
// with arbitrary limitation to 2048 strings :(
|
||||
|
Reference in New Issue
Block a user