[SDL2] pointer boolean (#8523)

This commit is contained in:
Sylvain Becker
2023-11-10 15:30:56 +01:00
committed by GitHub
parent 4a3a9f3ad8
commit a14b948b6c
394 changed files with 2564 additions and 2559 deletions

View File

@@ -57,7 +57,7 @@ SDL_CreateCond(void)
extern "C" void
SDL_DestroyCond(SDL_cond *cond)
{
if (cond != NULL) {
if (cond) {
delete cond;
}
}
@@ -66,7 +66,7 @@ SDL_DestroyCond(SDL_cond *cond)
extern "C" int
SDL_CondSignal(SDL_cond *cond)
{
if (cond == NULL) {
if (!cond) {
return SDL_InvalidParamError("cond");
}
@@ -78,7 +78,7 @@ SDL_CondSignal(SDL_cond *cond)
extern "C" int
SDL_CondBroadcast(SDL_cond *cond)
{
if (cond == NULL) {
if (!cond) {
return SDL_InvalidParamError("cond");
}

View File

@@ -51,7 +51,7 @@ SDL_CreateMutex(void)
extern "C" void
SDL_DestroyMutex(SDL_mutex *mutex)
{
if (mutex != NULL) {
if (mutex) {
delete mutex;
}
}
@@ -77,7 +77,7 @@ int SDL_TryLockMutex(SDL_mutex *mutex)
{
int retval = 0;
if (mutex == NULL) {
if (!mutex) {
return 0;
}