[SDL2] pointer boolean (#8523)
This commit is contained in:
parent
4a3a9f3ad8
commit
a14b948b6c
394 changed files with 2564 additions and 2559 deletions
|
@ -65,13 +65,13 @@ void InitCreateRenderer(void *arg)
|
|||
*/
|
||||
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");
|
||||
|
@ -938,12 +938,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());
|
||||
}
|
||||
|
||||
|
@ -970,7 +970,7 @@ _hasTexColor(void)
|
|||
|
||||
/* Get test face. */
|
||||
tface = _loadTestFace();
|
||||
if (tface == NULL) {
|
||||
if (!tface) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1014,7 +1014,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