Fix minor warnings from clang.

This commit is contained in:
Stephen Anthony 2020-05-22 15:07:20 -02:30
parent b703d3df92
commit 94b1800cc4
2 changed files with 6 additions and 4 deletions

View File

@ -376,7 +376,7 @@ bool FrameBufferSDL2::adaptRefreshRate(Int32 displayIndex, SDL_DisplayMode& adap
SDL_DisplayMode closestSdlMode;
sdlMode.refresh_rate = wantedRefreshRate * m;
if(SDL_GetClosestDisplayMode(displayIndex, &sdlMode, &closestSdlMode) == NULL)
if(SDL_GetClosestDisplayMode(displayIndex, &sdlMode, &closestSdlMode) == nullptr)
{
Logger::error("ERROR: Closest display mode could not be retrieved");
return adapt;
@ -515,6 +515,7 @@ bool FrameBufferSDL2::fullScreen() const
#endif
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int FrameBufferSDL2::refreshRate() const
{
ASSERT_MAIN_THREAD;
@ -525,8 +526,9 @@ int FrameBufferSDL2::refreshRate() const
if(SDL_GetCurrentDisplayMode(displayIndex, &sdlMode) == 0)
return sdlMode.refresh_rate;
if (myWindow != NULL)
if(myWindow != nullptr)
Logger::error("Could not retrieve current display mode");
return 0;
}

View File

@ -184,8 +184,8 @@ class FrameBufferSDL2 : public FrameBuffer
/**
Checks if the display refresh rate should be adapted to game refresh rate in (real) fullscreen mode
@param displayIndex The display which should be checked
@adaptedSdlMode The best matching mode if the refresh rate should be changed
@param displayIndex The display which should be checked
@param adaptedSdlMode The best matching mode if the refresh rate should be changed
@return True if the refresh rate should be changed
*/