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

@@ -57,7 +57,7 @@ Sint64 SDL_CivilToDays(int year, int month, int day, int *day_of_week, int *day_
return z;
}
SDL_bool SDL_GetDateTimeLocalePreferences(SDL_DateFormat *dateFormat, SDL_TimeFormat *timeFormat)
bool SDL_GetDateTimeLocalePreferences(SDL_DateFormat *dateFormat, SDL_TimeFormat *timeFormat)
{
// Default to ISO 8061 date format, as it is unambiguous, and 24 hour time.
if (dateFormat) {
@@ -162,7 +162,7 @@ static bool SDL_DateTimeIsValid(const SDL_DateTime *dt)
return true;
}
SDL_bool SDL_DateTimeToTime(const SDL_DateTime *dt, SDL_Time *ticks)
bool SDL_DateTimeToTime(const SDL_DateTime *dt, SDL_Time *ticks)
{
static const Sint64 max_seconds = SDL_NS_TO_SECONDS(SDL_MAX_TIME) - 1;
static const Sint64 min_seconds = SDL_NS_TO_SECONDS(SDL_MIN_TIME) + 1;