Pointer as bool (libsdl-org#7214)

This commit is contained in:
Sylvain
2023-11-09 22:29:15 +01:00
committed by Sam Lantinga
parent 23db971681
commit d8600f717e
371 changed files with 2448 additions and 2442 deletions

View File

@@ -498,7 +498,7 @@ SDL_Surface *SDLgfx_rotateSurface(SDL_Surface *src, double angle, int smooth, in
double sangleinv, cangleinv;
/* Sanity check */
if (src == NULL) {
if (!src) {
return NULL;
}
@@ -522,7 +522,7 @@ SDL_Surface *SDLgfx_rotateSurface(SDL_Surface *src, double angle, int smooth, in
if (is8bit) {
/* Target surface is 8 bit */
rz_dst = SDL_CreateSurface(rect_dest->w, rect_dest->h + GUARD_ROWS, src->format->format);
if (rz_dst != NULL) {
if (rz_dst) {
if (src->format->palette) {
for (i = 0; i < src->format->palette->ncolors; i++) {
rz_dst->format->palette->colors[i] = src->format->palette->colors[i];
@@ -536,7 +536,7 @@ SDL_Surface *SDLgfx_rotateSurface(SDL_Surface *src, double angle, int smooth, in
}
/* Check target */
if (rz_dst == NULL) {
if (!rz_dst) {
return NULL;
}