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

@ -76,13 +76,13 @@ static void InitCreateRenderer(void *arg)
*/
static void CleanupDestroyRenderer(void *arg)
{
if (renderer != NULL) {
if (renderer) {
SDL_DestroyRenderer(renderer);
renderer = NULL;
SDLTest_AssertPass("SDL_DestroyRenderer()");
}
if (window != NULL) {
if (window) {
SDL_DestroyWindow(window);
window = NULL;
SDLTest_AssertPass("SDL_DestroyWindow");
@ -1054,12 +1054,12 @@ loadTestFace(void)
SDL_Texture *tface;
face = SDLTest_ImageFace();
if (face == NULL) {
if (!face) {
return NULL;
}
tface = SDL_CreateTextureFromSurface(renderer, face);
if (tface == NULL) {
if (!tface) {
SDLTest_LogError("SDL_CreateTextureFromSurface() failed with error: %s", SDL_GetError());
}
@ -1085,7 +1085,7 @@ hasTexColor(void)
/* Get test face. */
tface = loadTestFace();
if (tface == NULL) {
if (!tface) {
return 0;
}
@ -1128,7 +1128,7 @@ hasTexAlpha(void)
/* Get test face. */
tface = loadTestFace();
if (tface == NULL) {
if (!tface) {
return 0;
}