mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-07-13 12:40:29 +00:00
[SDL2] pointer boolean (#8523)
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user