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:
Sam Lantinga
2024-09-18 07:52:28 -07:00
parent 9dd8859240
commit a90ad3b0e2
258 changed files with 4052 additions and 4057 deletions

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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