Clang-Tidy fixes (#6725)

This commit is contained in:
Pierre Wendling
2022-12-01 16:07:03 -05:00
committed by GitHub
parent c2ce44bead
commit 3c501b963d
184 changed files with 1312 additions and 1154 deletions

View File

@@ -1008,12 +1008,12 @@ typedef struct _SDL_AudioStream SDL_AudioStream;
* \sa SDL_AudioStreamClear
* \sa SDL_FreeAudioStream
*/
extern DECLSPEC SDL_AudioStream * SDLCALL SDL_NewAudioStream(const SDL_AudioFormat src_format,
const Uint8 src_channels,
const int src_rate,
const SDL_AudioFormat dst_format,
const Uint8 dst_channels,
const int dst_rate);
extern DECLSPEC SDL_AudioStream *SDLCALL SDL_NewAudioStream(SDL_AudioFormat src_format,
Uint8 src_channels,
int src_rate,
SDL_AudioFormat dst_format,
Uint8 dst_channels,
int dst_rate);
/**
* Add data to be converted/resampled to the stream.

View File

@@ -276,7 +276,7 @@ extern DECLSPEC int SDLCALL SDL_SemTryWait(SDL_sem * sem);
* successful it will atomically decrement the semaphore value.
*
* \param sem the semaphore to wait on
* \param ms the length of the timeout, in milliseconds
* \param timeout the length of the timeout, in milliseconds
* \returns 0 if the wait succeeds, `SDL_MUTEX_TIMEDOUT` if the wait does not
* succeed in the allotted time, or a negative error code on failure;
* call SDL_GetError() for more information.
@@ -290,7 +290,7 @@ extern DECLSPEC int SDLCALL SDL_SemTryWait(SDL_sem * sem);
* \sa SDL_SemValue
* \sa SDL_SemWait
*/
extern DECLSPEC int SDLCALL SDL_SemWaitTimeout(SDL_sem * sem, Uint32 ms);
extern DECLSPEC int SDLCALL SDL_SemWaitTimeout(SDL_sem *sem, Uint32 timeout);
/**
* Atomically increment a semaphore's value and wake waiting threads.

View File

@@ -48,7 +48,6 @@ typedef enum
SDL_POWERSTATE_CHARGED /**< Plugged in, battery charged */
} SDL_PowerState;
/**
* Get the current power supply details.
*
@@ -65,17 +64,17 @@ typedef enum
* It's possible a platform can only report battery percentage or time left
* but not both.
*
* \param secs seconds of battery life left, you can pass a NULL here if you
* \param seconds seconds of battery life left, you can pass a NULL here if you
* don't care, will return -1 if we can't determine a value, or
* we're not running on a battery
* \param pct percentage of battery life left, between 0 and 100, you can pass
* \param percent percentage of battery life left, between 0 and 100, you can pass
* a NULL here if you don't care, will return -1 if we can't
* determine a value, or we're not running on a battery
* \returns an SDL_PowerState enum representing the current battery state.
*
* \since This function is available since SDL 3.0.0.
*/
extern DECLSPEC SDL_PowerState SDLCALL SDL_GetPowerInfo(int *secs, int *pct);
extern DECLSPEC SDL_PowerState SDLCALL SDL_GetPowerInfo(int *seconds, int *percent);
/* Ends C function definitions when using C++ */
#ifdef __cplusplus

View File

@@ -554,9 +554,9 @@ extern DECLSPEC SDL_Surface *SDLCALL SDL_DuplicateSurface(SDL_Surface * surface)
* surface. The new, optimized surface can then be used as the source for
* future blits, making them faster.
*
* \param src the existing SDL_Surface structure to convert
* \param fmt the SDL_PixelFormat structure that the new surface is optimized
* for
* \param surface the existing SDL_Surface structure to convert
* \param format the SDL_PixelFormat structure that the new surface is
* optimized for
* \returns the new SDL_Surface structure that is created or NULL if it fails;
* call SDL_GetError() for more information.
*
@@ -566,8 +566,8 @@ extern DECLSPEC SDL_Surface *SDLCALL SDL_DuplicateSurface(SDL_Surface * surface)
* \sa SDL_ConvertSurfaceFormat
* \sa SDL_CreateSurface
*/
extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurface
(SDL_Surface * src, const SDL_PixelFormat * fmt);
extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurface(SDL_Surface *surface,
const SDL_PixelFormat *format);
/**
* Copy an existing surface to a new surface of the specified format enum.
@@ -577,7 +577,7 @@ extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurface
* it might be easier to call but it doesn't have access to palette
* information for the destination surface, in case that would be important.
*
* \param src the existing SDL_Surface structure to convert
* \param surface the existing SDL_Surface structure to convert
* \param pixel_format the SDL_PixelFormatEnum that the new surface is
* optimized for
* \returns the new SDL_Surface structure that is created or NULL if it fails;
@@ -589,8 +589,8 @@ extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurface
* \sa SDL_ConvertSurface
* \sa SDL_CreateSurface
*/
extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurfaceFormat
(SDL_Surface * src, Uint32 pixel_format);
extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurfaceFormat(SDL_Surface *surface,
Uint32 pixel_format);
/**
* Copy a block of pixels of one format to another format.