mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-02 18:07:40 +00:00
Pointer as bool (libsdl-org#7214)
This commit is contained in:
parent
23db971681
commit
d8600f717e
371 changed files with 2448 additions and 2442 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue