Pointer as bool (libsdl-org#7214)

This commit is contained in:
Sylvain authored and Sam Lantinga committed 2023-11-09 14:18:36 -08:00
1 parent 23db971681
commit d8600f717e
371 files changed
+2448 -2442

No files matched your search

+5 -5
View File
@@ -353,21 +353,21 @@ static int surface_testCompleteSurfaceConversion(void *arg)
for (i = 0; i < SDL_arraysize(pixel_formats); ++i) {
for (j = 0; j < SDL_arraysize(pixel_formats); ++j) {
fmt1 = SDL_CreatePixelFormat(pixel_formats[i]);
SDL_assert(fmt1 != NULL);
SDL_assert(fmt1);
cvt1 = SDL_ConvertSurface(face, fmt1);
SDL_assert(cvt1 != NULL);
SDL_assert(cvt1);
fmt2 = SDL_CreatePixelFormat(pixel_formats[j]);
SDL_assert(fmt1 != NULL);
SDL_assert(fmt1);
cvt2 = SDL_ConvertSurface(cvt1, fmt2);
SDL_assert(cvt2 != NULL);
SDL_assert(cvt2);
if (fmt1->BytesPerPixel == face->format->BytesPerPixel &&
fmt2->BytesPerPixel == face->format->BytesPerPixel &&
(fmt1->Amask != 0) == (face->format->Amask != 0) &&
(fmt2->Amask != 0) == (face->format->Amask != 0)) {
final = SDL_ConvertSurface(cvt2, face->format);
SDL_assert(final != NULL);
SDL_assert(final);
/* Compare surface. */
ret = SDLTest_CompareSurfaces(face, final, 0);