mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-11-12 13:28:44 +00:00
Removed SDL_bool in favor of plain bool
We require stdbool.h in the build environment, so we might as well use the plain bool type. If your environment doesn't have stdbool.h, this simple replacement will suffice: typedef signed char bool;
This commit is contained in:
@@ -78,7 +78,7 @@ void SDL_BroadcastCondition(SDL_Condition *cond)
|
||||
pthread_cond_broadcast(&cond->cond);
|
||||
}
|
||||
|
||||
SDL_bool SDL_WaitConditionTimeoutNS(SDL_Condition *cond, SDL_Mutex *mutex, Sint64 timeoutNS)
|
||||
bool SDL_WaitConditionTimeoutNS(SDL_Condition *cond, SDL_Mutex *mutex, Sint64 timeoutNS)
|
||||
{
|
||||
#ifndef HAVE_CLOCK_GETTIME
|
||||
struct timeval delta;
|
||||
|
||||
@@ -82,7 +82,7 @@ void SDL_LockMutex(SDL_Mutex *mutex) SDL_NO_THREAD_SAFETY_ANALYSIS // clang does
|
||||
}
|
||||
}
|
||||
|
||||
SDL_bool SDL_TryLockMutex(SDL_Mutex *mutex)
|
||||
bool SDL_TryLockMutex(SDL_Mutex *mutex)
|
||||
{
|
||||
bool result = true;
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ void SDL_LockRWLockForWriting(SDL_RWLock *rwlock) SDL_NO_THREAD_SAFETY_ANALYSIS
|
||||
}
|
||||
}
|
||||
|
||||
SDL_bool SDL_TryLockRWLockForReading(SDL_RWLock *rwlock)
|
||||
bool SDL_TryLockRWLockForReading(SDL_RWLock *rwlock)
|
||||
{
|
||||
bool result = true;
|
||||
|
||||
@@ -86,7 +86,7 @@ SDL_bool SDL_TryLockRWLockForReading(SDL_RWLock *rwlock)
|
||||
return result;
|
||||
}
|
||||
|
||||
SDL_bool SDL_TryLockRWLockForWriting(SDL_RWLock *rwlock)
|
||||
bool SDL_TryLockRWLockForWriting(SDL_RWLock *rwlock)
|
||||
{
|
||||
bool result = true;
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ void SDL_DestroySemaphore(SDL_Semaphore *sem)
|
||||
}
|
||||
}
|
||||
|
||||
SDL_bool SDL_WaitSemaphoreTimeoutNS(SDL_Semaphore *sem, Sint64 timeoutNS)
|
||||
bool SDL_WaitSemaphoreTimeoutNS(SDL_Semaphore *sem, Sint64 timeoutNS)
|
||||
{
|
||||
#ifdef HAVE_SEM_TIMEDWAIT
|
||||
#ifndef HAVE_CLOCK_GETTIME
|
||||
|
||||
Reference in New Issue
Block a user