Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed two warnings that prevented W4 and treat warnings as errors #351

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions olcPixelGameEngine.h
Original file line number Diff line number Diff line change
Expand Up @@ -4257,11 +4257,12 @@ namespace olc
PFD_MAIN_PLANE, 0, 0, 0, 0
};

int pf = 0;
if (!(pf = ChoosePixelFormat(glDeviceContext, &pfd))) return olc::FAIL;
int pf = ChoosePixelFormat(glDeviceContext, &pfd);
if (!pf) return olc::FAIL;
SetPixelFormat(glDeviceContext, pf, &pfd);

if (!(glRenderContext = wglCreateContext(glDeviceContext))) return olc::FAIL;

glRenderContext = wglCreateContext(glDeviceContext);
if (!glRenderContext) return olc::FAIL;
wglMakeCurrent(glDeviceContext, glRenderContext);

// Remove Frame cap
Expand Down Expand Up @@ -6693,4 +6694,3 @@ namespace olc
// O------------------------------------------------------------------------------O
// | END OF OLC_PGE_APPLICATION |
// O------------------------------------------------------------------------------O