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

@@ -66,7 +66,7 @@ SDL_Environment *SDL_GetEnvironment(void)
return SDL_environment;
}
SDL_bool SDL_InitEnvironment(void)
bool SDL_InitEnvironment(void)
{
return (SDL_GetEnvironment() != NULL);
}
@@ -81,7 +81,7 @@ void SDL_QuitEnvironment(void)
}
}
SDL_Environment *SDL_CreateEnvironment(SDL_bool populated)
SDL_Environment *SDL_CreateEnvironment(bool populated)
{
SDL_Environment *env = SDL_calloc(1, sizeof(*env));
if (!env) {
@@ -221,7 +221,7 @@ char **SDL_GetEnvironmentVariables(SDL_Environment *env)
return result;
}
SDL_bool SDL_SetEnvironmentVariable(SDL_Environment *env, const char *name, const char *value, SDL_bool overwrite)
bool SDL_SetEnvironmentVariable(SDL_Environment *env, const char *name, const char *value, bool overwrite)
{
bool result = false;
@@ -263,7 +263,7 @@ SDL_bool SDL_SetEnvironmentVariable(SDL_Environment *env, const char *name, cons
return result;
}
SDL_bool SDL_UnsetEnvironmentVariable(SDL_Environment *env, const char *name)
bool SDL_UnsetEnvironmentVariable(SDL_Environment *env, const char *name)
{
bool result = false;