From 72adfc4ba718412b278282463fd46e96b78bfa5d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 21 Jul 2002 18:46:50 +0000 Subject: [PATCH] fixed a compilation warning git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16240 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/glcanvas.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/msw/glcanvas.cpp b/src/msw/glcanvas.cpp index b93f1995cb..5cbfd68cfb 100644 --- a/src/msw/glcanvas.cpp +++ b/src/msw/glcanvas.cpp @@ -399,7 +399,6 @@ static void AdjustPFDForAttributes(PIXELFORMATDESCRIPTOR& pfd, int *attribList) void wxGLCanvas::SetupPixelFormat(int *attribList) // (HDC hDC) { - int pixelFormat; PIXELFORMATDESCRIPTOR pfd = { sizeof(PIXELFORMATDESCRIPTOR), /* size */ 1, /* version */ @@ -423,13 +422,13 @@ void wxGLCanvas::SetupPixelFormat(int *attribList) // (HDC hDC) AdjustPFDForAttributes(pfd, attribList); - pixelFormat = ChoosePixelFormat((HDC) m_hDC, &pfd); + int pixelFormat = ChoosePixelFormat((HDC) m_hDC, &pfd); if (pixelFormat == 0) { - wxLogWarning(_("ChoosePixelFormat failed.")); + wxLogLastError(_T("ChoosePixelFormat")); } else { - if (SetPixelFormat((HDC) m_hDC, pixelFormat, &pfd) != TRUE) { - wxLogWarning(_("SetPixelFormat failed.")); + if ( !::SetPixelFormat((HDC) m_hDC, pixelFormat, &pfd) ) { + wxLogLastError(_T("SetPixelFormat")); } } } -- 2.45.2