diff options
author | David Robillard <d@drobilla.net> | 2022-04-22 16:06:05 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-04-23 21:18:35 -0400 |
commit | efc9744aa464f01eeeccc1b354b0564d819fdeb3 (patch) | |
tree | 96cc91d83f21ebf5a9bbd31f9fae747292a94a36 /src/win_gl.c | |
parent | c80ee9c1fccdf86b4c7c9d5a3b34ec024432e1a3 (diff) | |
download | pugl-efc9744aa464f01eeeccc1b354b0564d819fdeb3.tar.gz pugl-efc9744aa464f01eeeccc1b354b0564d819fdeb3.tar.bz2 pugl-efc9744aa464f01eeeccc1b354b0564d819fdeb3.zip |
Windows: Avoid else after return
Diffstat (limited to 'src/win_gl.c')
-rw-r--r-- | src/win_gl.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/win_gl.c b/src/win_gl.c index 718a93c..0a035a1 100644 --- a/src/win_gl.c +++ b/src/win_gl.c @@ -211,7 +211,9 @@ puglWinGlCreate(PuglView* view) // Create real window with desired pixel format if ((st = puglWinCreateWindow(view, "Pugl", &impl->hwnd, &impl->hdc))) { return st; - } else if (!SetPixelFormat(impl->hdc, impl->pfId, &impl->pfd)) { + } + + if (!SetPixelFormat(impl->hdc, impl->pfId, &impl->pfd)) { ReleaseDC(impl->hwnd, impl->hdc); DestroyWindow(impl->hwnd); impl->hwnd = NULL; @@ -224,7 +226,9 @@ puglWinGlCreate(PuglView* view) !(surface->hglrc = surface->procs.wglCreateContextAttribs( impl->hdc, 0, contextAttribs))) { return PUGL_CREATE_CONTEXT_FAILED; - } else if (!(surface->hglrc = wglCreateContext(impl->hdc))) { + } + + if (!(surface->hglrc = wglCreateContext(impl->hdc))) { return PUGL_CREATE_CONTEXT_FAILED; } |