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
This commit is contained in:
Vadim Zeitlin
2008-02-13 22:42:45 +00:00
parent ed4b62eaba
commit 6cdb1386bd

View File

@@ -193,15 +193,13 @@ bool wxPrinterDC::StartDoc(const wxString& message)
if (!m_hDC) if (!m_hDC)
return false; return false;
int ret = ::StartDoc(GetHdc(), &docinfo); if ( ::StartDoc(GetHdc(), &docinfo) <= 0 )
if (ret <= 0)
{ {
DWORD lastError = GetLastError(); wxLogLastError(wxT("StartDoc"));
wxLogDebug(wxT("wxDC::StartDoc failed with error: %ld\n"), lastError); return false;
} }
return (ret > 0); return true;
} }
void wxPrinterDC::EndDoc() void wxPrinterDC::EndDoc()