diff --git a/src/SDL.c b/src/SDL.c index d364b9df6f..e1daed6be7 100644 --- a/src/SDL.c +++ b/src/SDL.c @@ -448,8 +448,7 @@ void SDL_QuitSubSystem(Uint32 flags) #endif } -Uint32 -SDL_WasInit(Uint32 flags) +Uint32 SDL_WasInit(Uint32 flags) { int i; int num_subsystems = SDL_arraysize(SDL_SubsystemRefCount); diff --git a/src/atomic/SDL_atomic.c b/src/atomic/SDL_atomic.c index b22fc906fe..3e57a48cfb 100644 --- a/src/atomic/SDL_atomic.c +++ b/src/atomic/SDL_atomic.c @@ -203,8 +203,7 @@ int SDL_AtomicSet(SDL_AtomicInt *a, int v) #endif } -void * -SDL_AtomicSetPtr(void **a, void *v) +void *SDL_AtomicSetPtr(void **a, void *v) { #ifdef HAVE_MSC_ATOMICS return _InterlockedExchangePointer(a, v); @@ -270,8 +269,7 @@ int SDL_AtomicGet(SDL_AtomicInt *a) #endif } -void * -SDL_AtomicGetPtr(void **a) +void *SDL_AtomicGetPtr(void **a) { #ifdef HAVE_ATOMIC_LOAD_N return __atomic_load_n(a, __ATOMIC_SEQ_CST); diff --git a/src/audio/SDL_audio.c b/src/audio/SDL_audio.c index 3910b8dc3b..99c26d4063 100644 --- a/src/audio/SDL_audio.c +++ b/src/audio/SDL_audio.c @@ -495,8 +495,7 @@ int SDL_QueueAudio(SDL_AudioDeviceID devid, const void *data, Uint32 len) return rc; } -Uint32 -SDL_DequeueAudio(SDL_AudioDeviceID devid, void *data, Uint32 len) +Uint32 SDL_DequeueAudio(SDL_AudioDeviceID devid, void *data, Uint32 len) { SDL_AudioDevice *device = get_audio_device(devid); Uint32 rc; @@ -514,8 +513,7 @@ SDL_DequeueAudio(SDL_AudioDeviceID devid, void *data, Uint32 len) return rc; } -Uint32 -SDL_GetQueuedAudioSize(SDL_AudioDeviceID devid) +Uint32 SDL_GetQueuedAudioSize(SDL_AudioDeviceID devid) { Uint32 retval = 0; SDL_AudioDevice *device = get_audio_device(devid); @@ -1074,8 +1072,7 @@ static void close_audio_device(SDL_AudioDevice *device) SDL_free(device); } -static Uint16 -GetDefaultSamplesFromFreq(int freq) +static Uint16 GetDefaultSamplesFromFreq(int freq) { /* Pick a default of ~46 ms at desired frequency */ /* !!! FIXME: remove this when the non-Po2 resampling is in. */ diff --git a/src/core/windows/SDL_windows.c b/src/core/windows/SDL_windows.c index ef5ef3d757..918b1754dc 100644 --- a/src/core/windows/SDL_windows.c +++ b/src/core/windows/SDL_windows.c @@ -120,8 +120,7 @@ void WIN_CoUninitialize(void) } #ifndef __WINRT__ -void * -WIN_LoadComBaseFunction(const char *name) +void *WIN_LoadComBaseFunction(const char *name) { static SDL_bool s_bLoaded; static HMODULE s_hComBase; diff --git a/src/dynapi/SDL_dynapi.c b/src/dynapi/SDL_dynapi.c index c2dfa3546f..cc97d232fc 100644 --- a/src/dynapi/SDL_dynapi.c +++ b/src/dynapi/SDL_dynapi.c @@ -356,8 +356,7 @@ static Sint32 initialize_jumptable(Uint32 apiver, void *table, Uint32 tablesize) typedef Sint32(SDLCALL *SDL_DYNAPI_ENTRYFN)(Uint32 apiver, void *table, Uint32 tablesize); extern DECLSPEC Sint32 SDLCALL SDL_DYNAPI_entry(Uint32, void *, Uint32); -Sint32 -SDL_DYNAPI_entry(Uint32 apiver, void *table, Uint32 tablesize) +Sint32 SDL_DYNAPI_entry(Uint32 apiver, void *table, Uint32 tablesize) { return initialize_jumptable(apiver, table, tablesize); } diff --git a/src/events/SDL_mouse.c b/src/events/SDL_mouse.c index 64680db7d3..f49aae91d0 100644 --- a/src/events/SDL_mouse.c +++ b/src/events/SDL_mouse.c @@ -885,8 +885,7 @@ void SDL_QuitMouse(void) SDL_MouseRelativeWarpMotionChanged, mouse); } -Uint32 -SDL_GetMouseState(float *x, float *y) +Uint32 SDL_GetMouseState(float *x, float *y) { SDL_Mouse *mouse = SDL_GetMouse(); @@ -899,8 +898,7 @@ SDL_GetMouseState(float *x, float *y) return GetButtonState(mouse, SDL_TRUE); } -Uint32 -SDL_GetRelativeMouseState(float *x, float *y) +Uint32 SDL_GetRelativeMouseState(float *x, float *y) { SDL_Mouse *mouse = SDL_GetMouse(); @@ -915,8 +913,7 @@ SDL_GetRelativeMouseState(float *x, float *y) return GetButtonState(mouse, SDL_TRUE); } -Uint32 -SDL_GetGlobalMouseState(float *x, float *y) +Uint32 SDL_GetGlobalMouseState(float *x, float *y) { SDL_Mouse *mouse = SDL_GetMouse(); diff --git a/src/file/SDL_rwops.c b/src/file/SDL_rwops.c index 24be00a9a5..017ae9b67b 100644 --- a/src/file/SDL_rwops.c +++ b/src/file/SDL_rwops.c @@ -669,8 +669,7 @@ void SDL_DestroyRW(SDL_RWops *area) } /* Load all the data from an SDL data stream */ -void * -SDL_LoadFile_RW(SDL_RWops *src, size_t *datasize, int freesrc) +void *SDL_LoadFile_RW(SDL_RWops *src, size_t *datasize, int freesrc) { static const Sint64 FILE_CHUNK_SIZE = 1024; Sint64 size; @@ -733,38 +732,32 @@ done: return data; } -void * -SDL_LoadFile(const char *file, size_t *datasize) +void *SDL_LoadFile(const char *file, size_t *datasize) { return SDL_LoadFile_RW(SDL_RWFromFile(file, "rb"), datasize, 1); } -Sint64 -SDL_RWsize(SDL_RWops *context) +Sint64 SDL_RWsize(SDL_RWops *context) { return context->size(context); } -Sint64 -SDL_RWseek(SDL_RWops *context, Sint64 offset, int whence) +Sint64 SDL_RWseek(SDL_RWops *context, Sint64 offset, int whence) { return context->seek(context, offset, whence); } -Sint64 -SDL_RWtell(SDL_RWops *context) +Sint64 SDL_RWtell(SDL_RWops *context) { return context->seek(context, 0, SDL_RW_SEEK_CUR); } -Sint64 -SDL_RWread(SDL_RWops *context, void *ptr, Sint64 size) +Sint64 SDL_RWread(SDL_RWops *context, void *ptr, Sint64 size) { return context->read(context, ptr, size); } -Sint64 -SDL_RWwrite(SDL_RWops *context, const void *ptr, Sint64 size) +Sint64 SDL_RWwrite(SDL_RWops *context, const void *ptr, Sint64 size) { return context->write(context, ptr, size); } @@ -784,8 +777,7 @@ Uint8 SDL_ReadU8(SDL_RWops *src) return value; } -Uint16 -SDL_ReadLE16(SDL_RWops *src) +Uint16 SDL_ReadLE16(SDL_RWops *src) { Uint16 value = 0; @@ -793,8 +785,7 @@ SDL_ReadLE16(SDL_RWops *src) return SDL_SwapLE16(value); } -Uint16 -SDL_ReadBE16(SDL_RWops *src) +Uint16 SDL_ReadBE16(SDL_RWops *src) { Uint16 value = 0; @@ -802,8 +793,7 @@ SDL_ReadBE16(SDL_RWops *src) return SDL_SwapBE16(value); } -Uint32 -SDL_ReadLE32(SDL_RWops *src) +Uint32 SDL_ReadLE32(SDL_RWops *src) { Uint32 value = 0; @@ -811,8 +801,7 @@ SDL_ReadLE32(SDL_RWops *src) return SDL_SwapLE32(value); } -Uint32 -SDL_ReadBE32(SDL_RWops *src) +Uint32 SDL_ReadBE32(SDL_RWops *src) { Uint32 value = 0; @@ -820,8 +809,7 @@ SDL_ReadBE32(SDL_RWops *src) return SDL_SwapBE32(value); } -Uint64 -SDL_ReadLE64(SDL_RWops *src) +Uint64 SDL_ReadLE64(SDL_RWops *src) { Uint64 value = 0; @@ -829,8 +817,7 @@ SDL_ReadLE64(SDL_RWops *src) return SDL_SwapLE64(value); } -Uint64 -SDL_ReadBE64(SDL_RWops *src) +Uint64 SDL_ReadBE64(SDL_RWops *src) { Uint64 value = 0; diff --git a/src/joystick/windows/SDL_dinputjoystick.c b/src/joystick/windows/SDL_dinputjoystick.c index 7b1f2fb168..511eecf304 100644 --- a/src/joystick/windows/SDL_dinputjoystick.c +++ b/src/joystick/windows/SDL_dinputjoystick.c @@ -943,8 +943,7 @@ int SDL_DINPUT_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumbl return 0; } -Uint32 -SDL_DINPUT_JoystickGetCapabilities(SDL_Joystick *joystick) +Uint32 SDL_DINPUT_JoystickGetCapabilities(SDL_Joystick *joystick) { Uint32 result = 0; @@ -1193,8 +1192,7 @@ int SDL_DINPUT_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumbl return SDL_Unsupported(); } -Uint32 -SDL_DINPUT_JoystickGetCapabilities(SDL_Joystick *joystick) +Uint32 SDL_DINPUT_JoystickGetCapabilities(SDL_Joystick *joystick) { return 0; } diff --git a/src/joystick/windows/SDL_xinputjoystick.c b/src/joystick/windows/SDL_xinputjoystick.c index 6831bd2574..05a1354217 100644 --- a/src/joystick/windows/SDL_xinputjoystick.c +++ b/src/joystick/windows/SDL_xinputjoystick.c @@ -497,8 +497,7 @@ int SDL_XINPUT_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumbl return 0; } -Uint32 -SDL_XINPUT_JoystickGetCapabilities(SDL_Joystick *joystick) +Uint32 SDL_XINPUT_JoystickGetCapabilities(SDL_Joystick *joystick) { return SDL_JOYCAP_RUMBLE; } @@ -583,8 +582,7 @@ int SDL_XINPUT_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumbl return SDL_Unsupported(); } -Uint32 -SDL_XINPUT_JoystickGetCapabilities(SDL_Joystick *joystick) +Uint32 SDL_XINPUT_JoystickGetCapabilities(SDL_Joystick *joystick) { return 0; } diff --git a/src/render/direct3d11/SDL_render_d3d11.c b/src/render/direct3d11/SDL_render_d3d11.c index f5d436b6a5..f6de782d4f 100644 --- a/src/render/direct3d11/SDL_render_d3d11.c +++ b/src/render/direct3d11/SDL_render_d3d11.c @@ -196,8 +196,7 @@ static const GUID SDL_IID_ID3D11DeviceContext1 = { 0xbb2c6faa, 0xb5fb, 0x4082, { #pragma GCC diagnostic pop #endif -Uint32 -D3D11_DXGIFormatToSDLPixelFormat(DXGI_FORMAT dxgiFormat) +Uint32 D3D11_DXGIFormatToSDLPixelFormat(DXGI_FORMAT dxgiFormat) { switch (dxgiFormat) { case DXGI_FORMAT_B8G8R8A8_UNORM: diff --git a/src/render/direct3d12/SDL_render_d3d12.c b/src/render/direct3d12/SDL_render_d3d12.c index b563cf8e2c..3637f1a5a5 100644 --- a/src/render/direct3d12/SDL_render_d3d12.c +++ b/src/render/direct3d12/SDL_render_d3d12.c @@ -272,8 +272,7 @@ UINT D3D12_Align(UINT location, UINT alignment) return (location + (alignment - 1)) & ~(alignment - 1); } -Uint32 -D3D12_DXGIFormatToSDLPixelFormat(DXGI_FORMAT dxgiFormat) +Uint32 D3D12_DXGIFormatToSDLPixelFormat(DXGI_FORMAT dxgiFormat) { switch (dxgiFormat) { case DXGI_FORMAT_B8G8R8A8_UNORM: diff --git a/src/render/vitagxm/SDL_render_vita_gxm_memory.c b/src/render/vitagxm/SDL_render_vita_gxm_memory.c index 834270fe7c..0c29c76cfa 100644 --- a/src/render/vitagxm/SDL_render_vita_gxm_memory.c +++ b/src/render/vitagxm/SDL_render_vita_gxm_memory.c @@ -25,8 +25,7 @@ #include "SDL_render_vita_gxm_memory.h" -void * -vita_mem_alloc(unsigned int type, unsigned int size, unsigned int alignment, unsigned int attribs, SceUID *uid) +void *vita_mem_alloc(unsigned int type, unsigned int size, unsigned int alignment, unsigned int attribs, SceUID *uid) { void *mem; @@ -63,8 +62,7 @@ void vita_mem_free(SceUID uid) sceKernelFreeMemBlock(uid); } -void * -vita_gpu_mem_alloc(VITA_GXM_RenderData *data, unsigned int size) +void *vita_gpu_mem_alloc(VITA_GXM_RenderData *data, unsigned int size) { void *mem; @@ -122,8 +120,7 @@ void vita_gpu_mem_destroy(VITA_GXM_RenderData *data) } } -void * -vita_mem_vertex_usse_alloc(unsigned int size, SceUID *uid, unsigned int *usse_offset) +void *vita_mem_vertex_usse_alloc(unsigned int size, SceUID *uid, unsigned int *usse_offset) { void *mem = NULL; @@ -150,8 +147,7 @@ void vita_mem_vertex_usse_free(SceUID uid) sceKernelFreeMemBlock(uid); } -void * -vita_mem_fragment_usse_alloc(unsigned int size, SceUID *uid, unsigned int *usse_offset) +void *vita_mem_fragment_usse_alloc(unsigned int size, SceUID *uid, unsigned int *usse_offset) { void *mem = NULL; diff --git a/src/render/vitagxm/SDL_render_vita_gxm_tools.c b/src/render/vitagxm/SDL_render_vita_gxm_tools.c index e4c2b2d264..bc3e0d8c8e 100644 --- a/src/render/vitagxm/SDL_render_vita_gxm_tools.c +++ b/src/render/vitagxm/SDL_render_vita_gxm_tools.c @@ -79,8 +79,7 @@ static void patcher_host_free(void *user_data, void *mem) SDL_free(mem); } -void * -pool_malloc(VITA_GXM_RenderData *data, unsigned int size) +void *pool_malloc(VITA_GXM_RenderData *data, unsigned int size) { if ((data->pool_index + size) < VITA_GXM_POOL_SIZE) { @@ -92,8 +91,7 @@ pool_malloc(VITA_GXM_RenderData *data, unsigned int size) return NULL; } -void * -pool_memalign(VITA_GXM_RenderData *data, unsigned int size, unsigned int alignment) +void *pool_memalign(VITA_GXM_RenderData *data, unsigned int size, unsigned int alignment) { unsigned int new_index = (data->pool_index + alignment - 1) & ~(alignment - 1); if ((new_index + size) < VITA_GXM_POOL_SIZE) { @@ -957,8 +955,7 @@ gxm_texture_get_format(const gxm_texture *texture) return sceGxmTextureGetFormat(&texture->gxm_tex); } -void * -gxm_texture_get_datap(const gxm_texture *texture) +void *gxm_texture_get_datap(const gxm_texture *texture) { return sceGxmTextureGetData(&texture->gxm_tex); } diff --git a/src/stdlib/SDL_qsort.c b/src/stdlib/SDL_qsort.c index aef800367e..42a173ac5f 100644 --- a/src/stdlib/SDL_qsort.c +++ b/src/stdlib/SDL_qsort.c @@ -528,8 +528,7 @@ extern void qsortG(void *base, size_t nmemb, size_t size, #endif /* HAVE_QSORT */ -void * -SDL_bsearch(const void *key, const void *base, size_t nmemb, size_t size, int (*compare)(const void *, const void *)) +void *SDL_bsearch(const void *key, const void *base, size_t nmemb, size_t size, int (*compare)(const void *, const void *)) { #ifdef HAVE_BSEARCH return bsearch(key, base, nmemb, size, compare); diff --git a/src/stdlib/SDL_stdlib.c b/src/stdlib/SDL_stdlib.c index 29d3a25516..3924ba1c5a 100644 --- a/src/stdlib/SDL_stdlib.c +++ b/src/stdlib/SDL_stdlib.c @@ -533,8 +533,7 @@ int SDL_tolower(int x) { return ((x) >= 'A') && ((x) <= 'Z') ? ('a' + ((x) - 'A' /* This file contains a portable memcpy manipulation function for SDL */ -void * -SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len) +void *SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len) { #ifdef __GNUC__ /* Presumably this is well tuned for speed. @@ -586,8 +585,7 @@ SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, #endif /* __GNUC__ */ } -void * -SDL_memset(SDL_OUT_BYTECAP(len) void *dst, int c, size_t len) +void *SDL_memset(SDL_OUT_BYTECAP(len) void *dst, int c, size_t len) { #ifdef HAVE_MEMSET return memset(dst, c, len); @@ -636,8 +634,7 @@ SDL_memset(SDL_OUT_BYTECAP(len) void *dst, int c, size_t len) } /* Note that memset() is a byte assignment and this is a 32-bit assignment, so they're not directly equivalent. */ -void * -SDL_memset4(void *dst, Uint32 val, size_t dwords) +void *SDL_memset4(void *dst, Uint32 val, size_t dwords) { #if defined(__APPLE__) && defined(HAVE_STRING_H) memset_pattern4(dst, &val, dwords * 4); diff --git a/src/stdlib/SDL_string.c b/src/stdlib/SDL_string.c index a2918cd62f..f8eb4f4eef 100644 --- a/src/stdlib/SDL_string.c +++ b/src/stdlib/SDL_string.c @@ -287,8 +287,7 @@ SDL_ScanFloat(const char *text, double *valuep) } #endif -void * -SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len) +void *SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len) { #ifdef HAVE_MEMMOVE return memmove(dst, src, len); @@ -959,8 +958,7 @@ SDL_strtoul(const char *string, char **endp, int base) #endif /* HAVE_STRTOUL */ } -Sint64 -SDL_strtoll(const char *string, char **endp, int base) +Sint64 SDL_strtoll(const char *string, char **endp, int base) { #ifdef HAVE_STRTOLL return strtoll(string, endp, base); @@ -984,8 +982,7 @@ SDL_strtoll(const char *string, char **endp, int base) #endif /* HAVE_STRTOLL */ } -Uint64 -SDL_strtoull(const char *string, char **endp, int base) +Uint64 SDL_strtoull(const char *string, char **endp, int base) { #ifdef HAVE_STRTOULL return strtoull(string, endp, base); diff --git a/src/test/SDL_test_fuzzer.c b/src/test/SDL_test_fuzzer.c index c6de64426a..f3d5940b57 100644 --- a/src/test/SDL_test_fuzzer.c +++ b/src/test/SDL_test_fuzzer.c @@ -71,40 +71,35 @@ Sint8 SDLTest_RandomSint8(void) return (Sint8)SDLTest_RandomInt(&rndContext) & 0x000000FF; } -Uint16 -SDLTest_RandomUint16(void) +Uint16 SDLTest_RandomUint16(void) { fuzzerInvocationCounter++; return (Uint16)SDLTest_RandomInt(&rndContext) & 0x0000FFFF; } -Sint16 -SDLTest_RandomSint16(void) +Sint16 SDLTest_RandomSint16(void) { fuzzerInvocationCounter++; return (Sint16)SDLTest_RandomInt(&rndContext) & 0x0000FFFF; } -Sint32 -SDLTest_RandomSint32(void) +Sint32 SDLTest_RandomSint32(void) { fuzzerInvocationCounter++; return (Sint32)SDLTest_RandomInt(&rndContext); } -Uint32 -SDLTest_RandomUint32(void) +Uint32 SDLTest_RandomUint32(void) { fuzzerInvocationCounter++; return (Uint32)SDLTest_RandomInt(&rndContext); } -Uint64 -SDLTest_RandomUint64(void) +Uint64 SDLTest_RandomUint64(void) { union { @@ -121,8 +116,7 @@ SDLTest_RandomUint64(void) return value.v64; } -Sint64 -SDLTest_RandomSint64(void) +Sint64 SDLTest_RandomSint64(void) { union { @@ -139,8 +133,7 @@ SDLTest_RandomSint64(void) return (Sint64)value.v64; } -Sint32 -SDLTest_RandomIntegerInRange(Sint32 pMin, Sint32 pMax) +Sint32 SDLTest_RandomIntegerInRange(Sint32 pMin, Sint32 pMax) { Sint64 min = pMin; Sint64 max = pMax; @@ -254,8 +247,7 @@ Uint8 SDLTest_RandomUint8BoundaryValue(Uint8 boundary1, Uint8 boundary2, SDL_boo validDomain); } -Uint16 -SDLTest_RandomUint16BoundaryValue(Uint16 boundary1, Uint16 boundary2, SDL_bool validDomain) +Uint16 SDLTest_RandomUint16BoundaryValue(Uint16 boundary1, Uint16 boundary2, SDL_bool validDomain) { /* max value for Uint16 */ const Uint64 maxValue = USHRT_MAX; @@ -264,8 +256,7 @@ SDLTest_RandomUint16BoundaryValue(Uint16 boundary1, Uint16 boundary2, SDL_bool v validDomain); } -Uint32 -SDLTest_RandomUint32BoundaryValue(Uint32 boundary1, Uint32 boundary2, SDL_bool validDomain) +Uint32 SDLTest_RandomUint32BoundaryValue(Uint32 boundary1, Uint32 boundary2, SDL_bool validDomain) { /* max value for Uint32 */ #if ((ULONG_MAX) == (UINT_MAX)) @@ -278,8 +269,7 @@ SDLTest_RandomUint32BoundaryValue(Uint32 boundary1, Uint32 boundary2, SDL_bool v validDomain); } -Uint64 -SDLTest_RandomUint64BoundaryValue(Uint64 boundary1, Uint64 boundary2, SDL_bool validDomain) +Uint64 SDLTest_RandomUint64BoundaryValue(Uint64 boundary1, Uint64 boundary2, SDL_bool validDomain) { /* max value for Uint64 */ const Uint64 maxValue = UINT64_MAX; @@ -384,8 +374,7 @@ Sint8 SDLTest_RandomSint8BoundaryValue(Sint8 boundary1, Sint8 boundary2, SDL_boo validDomain); } -Sint16 -SDLTest_RandomSint16BoundaryValue(Sint16 boundary1, Sint16 boundary2, SDL_bool validDomain) +Sint16 SDLTest_RandomSint16BoundaryValue(Sint16 boundary1, Sint16 boundary2, SDL_bool validDomain) { /* min & max values for Sint16 */ const Sint64 maxValue = SHRT_MAX; @@ -395,8 +384,7 @@ SDLTest_RandomSint16BoundaryValue(Sint16 boundary1, Sint16 boundary2, SDL_bool v validDomain); } -Sint32 -SDLTest_RandomSint32BoundaryValue(Sint32 boundary1, Sint32 boundary2, SDL_bool validDomain) +Sint32 SDLTest_RandomSint32BoundaryValue(Sint32 boundary1, Sint32 boundary2, SDL_bool validDomain) { /* min & max values for Sint32 */ #if ((ULONG_MAX) == (UINT_MAX)) @@ -411,8 +399,7 @@ SDLTest_RandomSint32BoundaryValue(Sint32 boundary1, Sint32 boundary2, SDL_bool v validDomain); } -Sint64 -SDLTest_RandomSint64BoundaryValue(Sint64 boundary1, Sint64 boundary2, SDL_bool validDomain) +Sint64 SDLTest_RandomSint64BoundaryValue(Sint64 boundary1, Sint64 boundary2, SDL_bool validDomain) { /* min & max values for Sint64 */ const Sint64 maxValue = INT64_MAX; diff --git a/src/thread/SDL_thread.c b/src/thread/SDL_thread.c index 6f05c5efef..172187d15d 100644 --- a/src/thread/SDL_thread.c +++ b/src/thread/SDL_thread.c @@ -33,8 +33,7 @@ SDL_TLSCreate(void) return SDL_AtomicIncRef(&SDL_tls_id) + 1; } -void * -SDL_TLSGet(SDL_TLSID id) +void *SDL_TLSGet(SDL_TLSID id) { SDL_TLSData *storage; diff --git a/src/thread/generic/SDL_syssem.c b/src/thread/generic/SDL_syssem.c index 765bd5fb61..20833b7ebd 100644 --- a/src/thread/generic/SDL_syssem.c +++ b/src/thread/generic/SDL_syssem.c @@ -42,8 +42,7 @@ int SDL_WaitSemaphoreTimeoutNS(SDL_Semaphore *sem, Sint64 timeoutNS) return SDL_SetError("SDL not built with thread support"); } -Uint32 -SDL_GetSemaphoreValue(SDL_Semaphore *sem) +Uint32 SDL_GetSemaphoreValue(SDL_Semaphore *sem) { return 0; } @@ -144,8 +143,7 @@ int SDL_WaitSemaphoreTimeoutNS(SDL_Semaphore *sem, Sint64 timeoutNS) return retval; } -Uint32 -SDL_GetSemaphoreValue(SDL_Semaphore *sem) +Uint32 SDL_GetSemaphoreValue(SDL_Semaphore *sem) { Uint32 value; diff --git a/src/thread/ngage/SDL_syssem.cpp b/src/thread/ngage/SDL_syssem.cpp index c7da5b8987..32eae6b779 100644 --- a/src/thread/ngage/SDL_syssem.cpp +++ b/src/thread/ngage/SDL_syssem.cpp @@ -139,8 +139,7 @@ int SDL_WaitSemaphoreTimeoutNS(SDL_Semaphore *sem, Sint64 timeoutNS) return info->iVal; } -Uint32 -SDL_GetSemaphoreValue(SDL_Semaphore *sem) +Uint32 SDL_GetSemaphoreValue(SDL_Semaphore *sem) { if (sem == NULL) { SDL_InvalidParamError("sem"); diff --git a/src/thread/pthread/SDL_syssem.c b/src/thread/pthread/SDL_syssem.c index c0fd1701b1..64f6a4ab21 100644 --- a/src/thread/pthread/SDL_syssem.c +++ b/src/thread/pthread/SDL_syssem.c @@ -149,8 +149,7 @@ int SDL_WaitSemaphoreTimeoutNS(SDL_Semaphore *sem, Sint64 timeoutNS) return retval; } -Uint32 -SDL_GetSemaphoreValue(SDL_Semaphore *sem) +Uint32 SDL_GetSemaphoreValue(SDL_Semaphore *sem) { int ret = 0; diff --git a/src/thread/windows/SDL_syssem.c b/src/thread/windows/SDL_syssem.c index 0d894e2f27..103af9b038 100644 --- a/src/thread/windows/SDL_syssem.c +++ b/src/thread/windows/SDL_syssem.c @@ -377,8 +377,7 @@ int SDL_WaitSemaphoreTimeoutNS(SDL_Semaphore *sem, Sint64 timeoutNS) return SDL_sem_impl_active.WaitTimeoutNS(sem, timeoutNS); } -Uint32 -SDL_GetSemaphoreValue(SDL_Semaphore *sem) +Uint32 SDL_GetSemaphoreValue(SDL_Semaphore *sem) { return SDL_sem_impl_active.Value(sem); } diff --git a/src/timer/SDL_timer.c b/src/timer/SDL_timer.c index bd4f3f1101..0052ff60f5 100644 --- a/src/timer/SDL_timer.c +++ b/src/timer/SDL_timer.c @@ -565,8 +565,7 @@ void SDL_QuitTicks(void) tick_start = 0; } -Uint64 -SDL_GetTicksNS(void) +Uint64 SDL_GetTicksNS(void) { Uint64 starting_value, value; diff --git a/src/timer/dummy/SDL_systimer.c b/src/timer/dummy/SDL_systimer.c index 56afc84531..351f35ceca 100644 --- a/src/timer/dummy/SDL_systimer.c +++ b/src/timer/dummy/SDL_systimer.c @@ -22,15 +22,13 @@ #if defined(SDL_TIMER_DUMMY) || defined(SDL_TIMERS_DISABLED) -Uint64 -SDL_GetPerformanceCounter(void) +Uint64 SDL_GetPerformanceCounter(void) { SDL_Unsupported(); return 0; } -Uint64 -SDL_GetPerformanceFrequency(void) +Uint64 SDL_GetPerformanceFrequency(void) { return 1; } diff --git a/src/timer/haiku/SDL_systimer.c b/src/timer/haiku/SDL_systimer.c index 71d114e564..6bc51e71a9 100644 --- a/src/timer/haiku/SDL_systimer.c +++ b/src/timer/haiku/SDL_systimer.c @@ -25,14 +25,12 @@ #include -Uint64 -SDL_GetPerformanceCounter(void) +Uint64 SDL_GetPerformanceCounter(void) { return system_time(); } -Uint64 -SDL_GetPerformanceFrequency(void) +Uint64 SDL_GetPerformanceFrequency(void) { return SDL_US_PER_SECOND; } diff --git a/src/timer/n3ds/SDL_systimer.c b/src/timer/n3ds/SDL_systimer.c index 01cfbb4815..fc8fdc304a 100644 --- a/src/timer/n3ds/SDL_systimer.c +++ b/src/timer/n3ds/SDL_systimer.c @@ -25,14 +25,12 @@ #include <3ds.h> -Uint64 -SDL_GetPerformanceCounter(void) +Uint64 SDL_GetPerformanceCounter(void) { return svcGetSystemTick(); } -Uint64 -SDL_GetPerformanceFrequency(void) +Uint64 SDL_GetPerformanceFrequency(void) { return SYSCLOCK_ARM11; } diff --git a/src/timer/ngage/SDL_systimer.cpp b/src/timer/ngage/SDL_systimer.cpp index 10b49bc928..41037a86ed 100644 --- a/src/timer/ngage/SDL_systimer.cpp +++ b/src/timer/ngage/SDL_systimer.cpp @@ -32,15 +32,13 @@ extern "C" { #endif -Uint64 -SDL_GetPerformanceCounter(void) +Uint64 SDL_GetPerformanceCounter(void) { /* FIXME: Need to account for 32-bit wrapping */ return (Uint64)User::TickCount(); } -Uint64 -SDL_GetPerformanceFrequency(void) +Uint64 SDL_GetPerformanceFrequency(void) { return SDL_US_PER_SECOND; } diff --git a/src/timer/ps2/SDL_systimer.c b/src/timer/ps2/SDL_systimer.c index efe4708e4e..2ba22807c7 100644 --- a/src/timer/ps2/SDL_systimer.c +++ b/src/timer/ps2/SDL_systimer.c @@ -29,14 +29,12 @@ #include -Uint64 -SDL_GetPerformanceCounter(void) +Uint64 SDL_GetPerformanceCounter(void) { return GetTimerSystemTime(); } -Uint64 -SDL_GetPerformanceFrequency(void) +Uint64 SDL_GetPerformanceFrequency(void) { return kBUSCLK; } diff --git a/src/timer/psp/SDL_systimer.c b/src/timer/psp/SDL_systimer.c index 31aded8f1b..7ccf73fe07 100644 --- a/src/timer/psp/SDL_systimer.c +++ b/src/timer/psp/SDL_systimer.c @@ -29,8 +29,7 @@ #include -Uint64 -SDL_GetPerformanceCounter(void) +Uint64 SDL_GetPerformanceCounter(void) { Uint64 ticks; struct timeval now; @@ -42,8 +41,7 @@ SDL_GetPerformanceCounter(void) return ticks; } -Uint64 -SDL_GetPerformanceFrequency(void) +Uint64 SDL_GetPerformanceFrequency(void) { return SDL_US_PER_SECOND; } diff --git a/src/timer/unix/SDL_systimer.c b/src/timer/unix/SDL_systimer.c index 36a45d6eaa..3691a08d01 100644 --- a/src/timer/unix/SDL_systimer.c +++ b/src/timer/unix/SDL_systimer.c @@ -82,8 +82,7 @@ static void CheckMonotonicTime(void) checked_monotonic_time = SDL_TRUE; } -Uint64 -SDL_GetPerformanceCounter(void) +Uint64 SDL_GetPerformanceCounter(void) { Uint64 ticks; @@ -116,8 +115,7 @@ SDL_GetPerformanceCounter(void) return ticks; } -Uint64 -SDL_GetPerformanceFrequency(void) +Uint64 SDL_GetPerformanceFrequency(void) { if (!checked_monotonic_time) { CheckMonotonicTime(); diff --git a/src/timer/vita/SDL_systimer.c b/src/timer/vita/SDL_systimer.c index 87248fe30e..f7523248e8 100644 --- a/src/timer/vita/SDL_systimer.c +++ b/src/timer/vita/SDL_systimer.c @@ -29,14 +29,12 @@ #include -Uint64 -SDL_GetPerformanceCounter(void) +Uint64 SDL_GetPerformanceCounter(void) { return sceKernelGetProcessTimeWide(); } -Uint64 -SDL_GetPerformanceFrequency(void) +Uint64 SDL_GetPerformanceFrequency(void) { return SDL_US_PER_SECOND; } diff --git a/src/timer/windows/SDL_systimer.c b/src/timer/windows/SDL_systimer.c index 7cdf2a4ab4..15c872e68d 100644 --- a/src/timer/windows/SDL_systimer.c +++ b/src/timer/windows/SDL_systimer.c @@ -25,8 +25,7 @@ #include "../../core/windows/SDL_windows.h" -Uint64 -SDL_GetPerformanceCounter(void) +Uint64 SDL_GetPerformanceCounter(void) { LARGE_INTEGER counter; const BOOL rc = QueryPerformanceCounter(&counter); @@ -34,8 +33,7 @@ SDL_GetPerformanceCounter(void) return (Uint64)counter.QuadPart; } -Uint64 -SDL_GetPerformanceFrequency(void) +Uint64 SDL_GetPerformanceFrequency(void) { LARGE_INTEGER frequency; const BOOL rc = QueryPerformanceFrequency(&frequency); diff --git a/src/video/SDL_clipboard.c b/src/video/SDL_clipboard.c index fdcbf19b34..2e798b29f6 100644 --- a/src/video/SDL_clipboard.c +++ b/src/video/SDL_clipboard.c @@ -78,8 +78,7 @@ int SDL_SetPrimarySelectionText(const char *text) } } -void * -SDL_GetClipboardData(size_t *length, const char *mime_type) +void *SDL_GetClipboardData(size_t *length, const char *mime_type) { SDL_VideoDevice *_this = SDL_GetVideoDevice(); if (_this == NULL) { @@ -193,8 +192,7 @@ SDL_HasPrimarySelectionText(void) return SDL_FALSE; } -void * -SDL_GetClipboardUserdata(void) +void *SDL_GetClipboardUserdata(void) { SDL_VideoDevice *_this = SDL_GetVideoDevice(); diff --git a/src/video/SDL_pixels.c b/src/video/SDL_pixels.c index ba0007667e..deb7da7353 100644 --- a/src/video/SDL_pixels.c +++ b/src/video/SDL_pixels.c @@ -301,9 +301,7 @@ SDL_GetMasksForPixelFormatEnum(Uint32 format, int *bpp, Uint32 *Rmask, return SDL_TRUE; } -Uint32 -SDL_GetPixelFormatEnumForMasks(int bpp, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, - Uint32 Amask) +Uint32 SDL_GetPixelFormatEnumForMasks(int bpp, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask) { switch (bpp) { case 1: @@ -861,8 +859,7 @@ void SDL_DetectPalette(SDL_Palette *pal, SDL_bool *is_opaque, SDL_bool *has_alph } /* Find the opaque pixel value corresponding to an RGB triple */ -Uint32 -SDL_MapRGB(const SDL_PixelFormat *format, Uint8 r, Uint8 g, Uint8 b) +Uint32 SDL_MapRGB(const SDL_PixelFormat *format, Uint8 r, Uint8 g, Uint8 b) { if (format->palette == NULL) { return (r >> format->Rloss) << format->Rshift | (g >> format->Gloss) << format->Gshift | (b >> format->Bloss) << format->Bshift | format->Amask; @@ -872,8 +869,7 @@ SDL_MapRGB(const SDL_PixelFormat *format, Uint8 r, Uint8 g, Uint8 b) } /* Find the pixel value corresponding to an RGBA quadruple */ -Uint32 -SDL_MapRGBA(const SDL_PixelFormat *format, Uint8 r, Uint8 g, Uint8 b, +Uint32 SDL_MapRGBA(const SDL_PixelFormat *format, Uint8 r, Uint8 g, Uint8 b, Uint8 a) { if (format->palette == NULL) { diff --git a/src/video/cocoa/SDL_cocoametalview.m b/src/video/cocoa/SDL_cocoametalview.m index 7aaffb722a..46d11251e8 100644 --- a/src/video/cocoa/SDL_cocoametalview.m +++ b/src/video/cocoa/SDL_cocoametalview.m @@ -132,8 +132,7 @@ static int SDLCALL SDL_MetalViewEventWatch(void *userdata, SDL_Event *event) @end -SDL_MetalView -Cocoa_Metal_CreateView(SDL_VideoDevice *_this, SDL_Window *window) +SDL_MetalView Cocoa_Metal_CreateView(SDL_VideoDevice *_this, SDL_Window *window) { @autoreleasepool { SDL_CocoaWindowData *data = (__bridge SDL_CocoaWindowData *)window->driverdata; @@ -172,8 +171,7 @@ void Cocoa_Metal_DestroyView(SDL_VideoDevice *_this, SDL_MetalView view) } } -void * -Cocoa_Metal_GetLayer(SDL_VideoDevice *_this, SDL_MetalView view) +void *Cocoa_Metal_GetLayer(SDL_VideoDevice *_this, SDL_MetalView view) { @autoreleasepool { SDL_cocoametalview *cocoaview = (__bridge SDL_cocoametalview *)view; diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m index 28236dbf98..c4ad521a95 100644 --- a/src/video/cocoa/SDL_cocoawindow.m +++ b/src/video/cocoa/SDL_cocoawindow.m @@ -2330,8 +2330,7 @@ void Cocoa_SetWindowFullscreen(SDL_VideoDevice *_this, SDL_Window *window, SDL_V } } -void * -Cocoa_GetWindowICCProfile(SDL_VideoDevice *_this, SDL_Window *window, size_t *size) +void *Cocoa_GetWindowICCProfile(SDL_VideoDevice *_this, SDL_Window *window, size_t *size) { @autoreleasepool { SDL_CocoaWindowData *data = (__bridge SDL_CocoaWindowData *)window->driverdata; diff --git a/src/video/uikit/SDL_uikitmetalview.m b/src/video/uikit/SDL_uikitmetalview.m index 1f1a4b0f2f..c82a4dcecc 100644 --- a/src/video/uikit/SDL_uikitmetalview.m +++ b/src/video/uikit/SDL_uikitmetalview.m @@ -74,8 +74,7 @@ @end -SDL_MetalView -UIKit_Metal_CreateView(SDL_VideoDevice *_this, SDL_Window *window) +SDL_MetalView UIKit_Metal_CreateView(SDL_VideoDevice *_this, SDL_Window *window) { @autoreleasepool { SDL_UIKitWindowData *data = (__bridge SDL_UIKitWindowData *)window->driverdata; @@ -115,8 +114,7 @@ void UIKit_Metal_DestroyView(SDL_VideoDevice *_this, SDL_MetalView view) } } -void * -UIKit_Metal_GetLayer(SDL_VideoDevice *_this, SDL_MetalView view) +void *UIKit_Metal_GetLayer(SDL_VideoDevice *_this, SDL_MetalView view) { @autoreleasepool { SDL_uikitview *uiview = (__bridge SDL_uikitview *)view; diff --git a/src/video/x11/SDL_x11modes.c b/src/video/x11/SDL_x11modes.c index 31f74e3c35..d0353d352e 100644 --- a/src/video/x11/SDL_x11modes.c +++ b/src/video/x11/SDL_x11modes.c @@ -249,8 +249,7 @@ int X11_GetVisualInfoFromVisual(Display *display, Visual *visual, XVisualInfo *v return -1; } -Uint32 -X11_GetPixelFormatFromVisualInfo(Display *display, XVisualInfo *vinfo) +Uint32 X11_GetPixelFormatFromVisualInfo(Display *display, XVisualInfo *vinfo) { if (vinfo->class == DirectColor || vinfo->class == TrueColor) { int bpp; diff --git a/src/video/x11/SDL_x11window.c b/src/video/x11/SDL_x11window.c index f92cc1f9d1..c2077df519 100644 --- a/src/video/x11/SDL_x11window.c +++ b/src/video/x11/SDL_x11window.c @@ -218,8 +218,7 @@ static void X11_SetKeyboardFocus(SDL_Window *window) SDL_SetKeyboardFocus(window); } -Uint32 -X11_GetNetWMState(SDL_VideoDevice *_this, SDL_Window *window, Window xwindow) +Uint32 X11_GetNetWMState(SDL_VideoDevice *_this, SDL_Window *window, Window xwindow) { SDL_VideoData *videodata = _this->driverdata; Display *display = videodata->display; @@ -1657,8 +1656,7 @@ static void X11_ReadProperty(SDL_x11Prop *p, Display *disp, Window w, Atom prop) p->type = type; } -void * -X11_GetWindowICCProfile(SDL_VideoDevice *_this, SDL_Window *window, size_t *size) +void *X11_GetWindowICCProfile(SDL_VideoDevice *_this, SDL_Window *window, size_t *size) { SDL_WindowData *data = window->driverdata; Display *display = data->videodata->display;