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

@@ -44,7 +44,7 @@ SDL_COMPILE_TIME_ASSERT(SDL_MIN_SINT64, SDL_MIN_SINT64 == ~INT64_C(0x7ffffffffff
SDL_COMPILE_TIME_ASSERT(SDL_MAX_UINT64, SDL_MAX_UINT64 == UINT64_C(18446744073709551615));
SDL_COMPILE_TIME_ASSERT(SDL_MIN_UINT64, SDL_MIN_UINT64 == 0);
static int TestTypes(SDL_bool verbose)
static int TestTypes(bool verbose)
{
int error = 0;
@@ -79,7 +79,7 @@ static int TestTypes(SDL_bool verbose)
return error ? 1 : 0;
}
static int TestEndian(SDL_bool verbose)
static int TestEndian(bool verbose)
{
int error = 0;
Uint16 value = 0x1234;
@@ -360,7 +360,7 @@ static LL_Test LL_Tests[] = {
{ NULL, NULL, 0, 0, 0, 0 }
};
static int Test64Bit(SDL_bool verbose)
static int Test64Bit(bool verbose)
{
LL_Test *t;
int failed = 0;
@@ -386,7 +386,7 @@ static int Test64Bit(SDL_bool verbose)
return failed ? 1 : 0;
}
static int TestCPUInfo(SDL_bool verbose)
static int TestCPUInfo(bool verbose)
{
if (verbose) {
SDL_Log("Number of logical CPU cores: %d\n", SDL_GetNumLogicalCPUCores());
@@ -410,7 +410,7 @@ static int TestCPUInfo(SDL_bool verbose)
return 0;
}
static int TestAssertions(SDL_bool verbose)
static int TestAssertions(bool verbose)
{
SDL_assert(1);
SDL_assert_release(1);
@@ -441,7 +441,7 @@ static int TestAssertions(SDL_bool verbose)
int main(int argc, char *argv[])
{
int i;
SDL_bool verbose = SDL_TRUE;
bool verbose = true;
int status = 0;
SDLTest_CommonState *state;
@@ -458,7 +458,7 @@ int main(int argc, char *argv[])
consumed = SDLTest_CommonArg(state, i);
if (!consumed) {
if (SDL_strcmp(argv[i], "-q") == 0) {
verbose = SDL_FALSE;
verbose = false;
consumed = 1;
}
}