From 9357cee2ef96fbe345a82ac2f6af7c715d1e6027 Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Wed, 7 Jun 2017 04:42:41 -0700 Subject: do not assign in conditional statements --- Source/Core/Common/GL/GLInterface/WGL.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Source/Core/Common/GL/GLInterface/WGL.cpp') diff --git a/Source/Core/Common/GL/GLInterface/WGL.cpp b/Source/Core/Common/GL/GLInterface/WGL.cpp index 57c46cb42b..3e500f5866 100644 --- a/Source/Core/Common/GL/GLInterface/WGL.cpp +++ b/Source/Core/Common/GL/GLInterface/WGL.cpp @@ -248,8 +248,8 @@ bool cInterfaceWGL::Create(void* window_handle, bool core) return false; } - int pixel_format; - if (!(pixel_format = ChoosePixelFormat(m_dc, &pfd))) + int pixel_format = ChoosePixelFormat(m_dc, &pfd); + if (!pixel_format) { PanicAlert("(2) Can't find a suitable PixelFormat."); return false; @@ -261,7 +261,8 @@ bool cInterfaceWGL::Create(void* window_handle, bool core) return false; } - if (!(m_rc = wglCreateContext(m_dc))) + m_rc = wglCreateContext(m_dc); + if (!m_rc) { PanicAlert("(4) Can't create an OpenGL rendering context."); return false; -- cgit v1.2.3