From 6cdb1386bd19f381c83cb1d3600c38cceff4eb87 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 13 Feb 2008 22:42:45 +0000 Subject: [PATCH] fix gcc format string warning and simplify the code a little as was already done in the trunk git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@51771 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/dcprint.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/msw/dcprint.cpp b/src/msw/dcprint.cpp index 2450426227..4b514b9e32 100644 --- a/src/msw/dcprint.cpp +++ b/src/msw/dcprint.cpp @@ -193,15 +193,13 @@ bool wxPrinterDC::StartDoc(const wxString& message) if (!m_hDC) return false; - int ret = ::StartDoc(GetHdc(), &docinfo); - - if (ret <= 0) + if ( ::StartDoc(GetHdc(), &docinfo) <= 0 ) { - DWORD lastError = GetLastError(); - wxLogDebug(wxT("wxDC::StartDoc failed with error: %ld\n"), lastError); + wxLogLastError(wxT("StartDoc")); + return false; } - return (ret > 0); + return true; } void wxPrinterDC::EndDoc()