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:
@@ -219,7 +219,7 @@ bool SDL_WaitConditionTimeoutNS_generic(SDL_Condition *_cond, SDL_Mutex *mutex,
|
||||
}
|
||||
|
||||
#ifndef SDL_THREAD_GENERIC_COND_SUFFIX
|
||||
SDL_bool SDL_WaitConditionTimeoutNS(SDL_Condition *cond, SDL_Mutex *mutex, Sint64 timeoutNS)
|
||||
bool SDL_WaitConditionTimeoutNS(SDL_Condition *cond, SDL_Mutex *mutex, Sint64 timeoutNS)
|
||||
{
|
||||
return SDL_WaitConditionTimeoutNS_generic(cond, mutex, timeoutNS);
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ void SDL_LockMutex(SDL_Mutex *mutex) SDL_NO_THREAD_SAFETY_ANALYSIS // clang doe
|
||||
#endif // SDL_THREADS_DISABLED
|
||||
}
|
||||
|
||||
SDL_bool SDL_TryLockMutex(SDL_Mutex *mutex)
|
||||
bool SDL_TryLockMutex(SDL_Mutex *mutex)
|
||||
{
|
||||
bool result = true;
|
||||
#ifndef SDL_THREADS_DISABLED
|
||||
|
||||
@@ -139,7 +139,7 @@ bool SDL_TryLockRWLockForReading_generic(SDL_RWLock *rwlock)
|
||||
}
|
||||
|
||||
#ifndef SDL_THREAD_GENERIC_RWLOCK_SUFFIX
|
||||
SDL_bool SDL_TryLockRWLockForReading(SDL_RWLock *rwlock)
|
||||
bool SDL_TryLockRWLockForReading(SDL_RWLock *rwlock)
|
||||
{
|
||||
return SDL_TryLockRWLockForReading_generic(rwlock);
|
||||
}
|
||||
@@ -167,7 +167,7 @@ bool SDL_TryLockRWLockForWriting_generic(SDL_RWLock *rwlock)
|
||||
}
|
||||
|
||||
#ifndef SDL_THREAD_GENERIC_RWLOCK_SUFFIX
|
||||
SDL_bool SDL_TryLockRWLockForWriting(SDL_RWLock *rwlock)
|
||||
bool SDL_TryLockRWLockForWriting(SDL_RWLock *rwlock)
|
||||
{
|
||||
return SDL_TryLockRWLockForWriting_generic(rwlock);
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ void SDL_DestroySemaphore(SDL_Semaphore *sem)
|
||||
{
|
||||
}
|
||||
|
||||
SDL_bool SDL_WaitSemaphoreTimeoutNS(SDL_Semaphore *sem, Sint64 timeoutNS)
|
||||
bool SDL_WaitSemaphoreTimeoutNS(SDL_Semaphore *sem, Sint64 timeoutNS)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -103,7 +103,7 @@ void SDL_DestroySemaphore(SDL_Semaphore *sem)
|
||||
}
|
||||
}
|
||||
|
||||
SDL_bool SDL_WaitSemaphoreTimeoutNS(SDL_Semaphore *sem, Sint64 timeoutNS)
|
||||
bool SDL_WaitSemaphoreTimeoutNS(SDL_Semaphore *sem, Sint64 timeoutNS)
|
||||
{
|
||||
bool result = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user