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

@@ -82,29 +82,29 @@ extern SDL_DECLSPEC int SDLCALL SDL_GetCPUCacheLineSize(void);
* This always returns false on CPUs that aren't using PowerPC instruction
* sets.
*
* \returns SDL_TRUE if the CPU has AltiVec features or SDL_FALSE if not.
* \returns true if the CPU has AltiVec features or false if not.
*
* \since This function is available since SDL 3.0.0.
*/
extern SDL_DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(void);
extern SDL_DECLSPEC bool SDLCALL SDL_HasAltiVec(void);
/**
* Determine whether the CPU has MMX features.
*
* This always returns false on CPUs that aren't using Intel instruction sets.
*
* \returns SDL_TRUE if the CPU has MMX features or SDL_FALSE if not.
* \returns true if the CPU has MMX features or false if not.
*
* \since This function is available since SDL 3.0.0.
*/
extern SDL_DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void);
extern SDL_DECLSPEC bool SDLCALL SDL_HasMMX(void);
/**
* Determine whether the CPU has SSE features.
*
* This always returns false on CPUs that aren't using Intel instruction sets.
*
* \returns SDL_TRUE if the CPU has SSE features or SDL_FALSE if not.
* \returns true if the CPU has SSE features or false if not.
*
* \since This function is available since SDL 3.0.0.
*
@@ -113,14 +113,14 @@ extern SDL_DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void);
* \sa SDL_HasSSE41
* \sa SDL_HasSSE42
*/
extern SDL_DECLSPEC SDL_bool SDLCALL SDL_HasSSE(void);
extern SDL_DECLSPEC bool SDLCALL SDL_HasSSE(void);
/**
* Determine whether the CPU has SSE2 features.
*
* This always returns false on CPUs that aren't using Intel instruction sets.
*
* \returns SDL_TRUE if the CPU has SSE2 features or SDL_FALSE if not.
* \returns true if the CPU has SSE2 features or false if not.
*
* \since This function is available since SDL 3.0.0.
*
@@ -129,14 +129,14 @@ extern SDL_DECLSPEC SDL_bool SDLCALL SDL_HasSSE(void);
* \sa SDL_HasSSE41
* \sa SDL_HasSSE42
*/
extern SDL_DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void);
extern SDL_DECLSPEC bool SDLCALL SDL_HasSSE2(void);
/**
* Determine whether the CPU has SSE3 features.
*
* This always returns false on CPUs that aren't using Intel instruction sets.
*
* \returns SDL_TRUE if the CPU has SSE3 features or SDL_FALSE if not.
* \returns true if the CPU has SSE3 features or false if not.
*
* \since This function is available since SDL 3.0.0.
*
@@ -145,14 +145,14 @@ extern SDL_DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void);
* \sa SDL_HasSSE41
* \sa SDL_HasSSE42
*/
extern SDL_DECLSPEC SDL_bool SDLCALL SDL_HasSSE3(void);
extern SDL_DECLSPEC bool SDLCALL SDL_HasSSE3(void);
/**
* Determine whether the CPU has SSE4.1 features.
*
* This always returns false on CPUs that aren't using Intel instruction sets.
*
* \returns SDL_TRUE if the CPU has SSE4.1 features or SDL_FALSE if not.
* \returns true if the CPU has SSE4.1 features or false if not.
*
* \since This function is available since SDL 3.0.0.
*
@@ -161,14 +161,14 @@ extern SDL_DECLSPEC SDL_bool SDLCALL SDL_HasSSE3(void);
* \sa SDL_HasSSE3
* \sa SDL_HasSSE42
*/
extern SDL_DECLSPEC SDL_bool SDLCALL SDL_HasSSE41(void);
extern SDL_DECLSPEC bool SDLCALL SDL_HasSSE41(void);
/**
* Determine whether the CPU has SSE4.2 features.
*
* This always returns false on CPUs that aren't using Intel instruction sets.
*
* \returns SDL_TRUE if the CPU has SSE4.2 features or SDL_FALSE if not.
* \returns true if the CPU has SSE4.2 features or false if not.
*
* \since This function is available since SDL 3.0.0.
*
@@ -177,49 +177,49 @@ extern SDL_DECLSPEC SDL_bool SDLCALL SDL_HasSSE41(void);
* \sa SDL_HasSSE3
* \sa SDL_HasSSE41
*/
extern SDL_DECLSPEC SDL_bool SDLCALL SDL_HasSSE42(void);
extern SDL_DECLSPEC bool SDLCALL SDL_HasSSE42(void);
/**
* Determine whether the CPU has AVX features.
*
* This always returns false on CPUs that aren't using Intel instruction sets.
*
* \returns SDL_TRUE if the CPU has AVX features or SDL_FALSE if not.
* \returns true if the CPU has AVX features or false if not.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_HasAVX2
* \sa SDL_HasAVX512F
*/
extern SDL_DECLSPEC SDL_bool SDLCALL SDL_HasAVX(void);
extern SDL_DECLSPEC bool SDLCALL SDL_HasAVX(void);
/**
* Determine whether the CPU has AVX2 features.
*
* This always returns false on CPUs that aren't using Intel instruction sets.
*
* \returns SDL_TRUE if the CPU has AVX2 features or SDL_FALSE if not.
* \returns true if the CPU has AVX2 features or false if not.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_HasAVX
* \sa SDL_HasAVX512F
*/
extern SDL_DECLSPEC SDL_bool SDLCALL SDL_HasAVX2(void);
extern SDL_DECLSPEC bool SDLCALL SDL_HasAVX2(void);
/**
* Determine whether the CPU has AVX-512F (foundation) features.
*
* This always returns false on CPUs that aren't using Intel instruction sets.
*
* \returns SDL_TRUE if the CPU has AVX-512F features or SDL_FALSE if not.
* \returns true if the CPU has AVX-512F features or false if not.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_HasAVX
* \sa SDL_HasAVX2
*/
extern SDL_DECLSPEC SDL_bool SDLCALL SDL_HasAVX512F(void);
extern SDL_DECLSPEC bool SDLCALL SDL_HasAVX512F(void);
/**
* Determine whether the CPU has ARM SIMD (ARMv6) features.
@@ -228,24 +228,24 @@ extern SDL_DECLSPEC SDL_bool SDLCALL SDL_HasAVX512F(void);
*
* This always returns false on CPUs that aren't using ARM instruction sets.
*
* \returns SDL_TRUE if the CPU has ARM SIMD features or SDL_FALSE if not.
* \returns true if the CPU has ARM SIMD features or false if not.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_HasNEON
*/
extern SDL_DECLSPEC SDL_bool SDLCALL SDL_HasARMSIMD(void);
extern SDL_DECLSPEC bool SDLCALL SDL_HasARMSIMD(void);
/**
* Determine whether the CPU has NEON (ARM SIMD) features.
*
* This always returns false on CPUs that aren't using ARM instruction sets.
*
* \returns SDL_TRUE if the CPU has ARM NEON features or SDL_FALSE if not.
* \returns true if the CPU has ARM NEON features or false if not.
*
* \since This function is available since SDL 3.0.0.
*/
extern SDL_DECLSPEC SDL_bool SDLCALL SDL_HasNEON(void);
extern SDL_DECLSPEC bool SDLCALL SDL_HasNEON(void);
/**
* Determine whether the CPU has LSX (LOONGARCH SIMD) features.
@@ -253,12 +253,12 @@ extern SDL_DECLSPEC SDL_bool SDLCALL SDL_HasNEON(void);
* This always returns false on CPUs that aren't using LOONGARCH instruction
* sets.
*
* \returns SDL_TRUE if the CPU has LOONGARCH LSX features or SDL_FALSE if
* \returns true if the CPU has LOONGARCH LSX features or false if
* not.
*
* \since This function is available since SDL 3.0.0.
*/
extern SDL_DECLSPEC SDL_bool SDLCALL SDL_HasLSX(void);
extern SDL_DECLSPEC bool SDLCALL SDL_HasLSX(void);
/**
* Determine whether the CPU has LASX (LOONGARCH SIMD) features.
@@ -266,12 +266,12 @@ extern SDL_DECLSPEC SDL_bool SDLCALL SDL_HasLSX(void);
* This always returns false on CPUs that aren't using LOONGARCH instruction
* sets.
*
* \returns SDL_TRUE if the CPU has LOONGARCH LASX features or SDL_FALSE if
* \returns true if the CPU has LOONGARCH LASX features or false if
* not.
*
* \since This function is available since SDL 3.0.0.
*/
extern SDL_DECLSPEC SDL_bool SDLCALL SDL_HasLASX(void);
extern SDL_DECLSPEC bool SDLCALL SDL_HasLASX(void);
/**
* Get the amount of RAM configured in the system.