mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-12-19 19:10:31 +08:00
Workaround for Visual Studio 2019 const warning
Visual Studio 2022, gcc, and clang all agree that "const SDL_DisplayMode **" is a non-const pointer to const data, but Visual Studio 2019 warns about this, so we'll just add a cast to the SDL_free() call for now. Apparently this was a legitimate bug that has been recently fixed: https://stackoverflow.com/questions/10403713/why-does-visual-c-warn-on-implicit-cast-from-const-void-to-void-in-c-but
This commit is contained in:
@@ -359,7 +359,7 @@ int video_getFullscreenDisplayModes(void *arg)
|
||||
SDLTest_AssertPass("Call to SDL_GetFullscreenDisplayModes(%" SDL_PRIu32 ")", displays[i]);
|
||||
SDLTest_AssertCheck(modes != NULL, "Validate returned value from function; expected != NULL; got: %p", modes);
|
||||
SDLTest_AssertCheck(count >= 0, "Validate number of modes; expected: >= 0; got: %d", count);
|
||||
SDL_free(modes);
|
||||
SDL_free((void *)modes);
|
||||
}
|
||||
SDL_free(displays);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user