mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-29 07:59:11 +00:00
Update for SDL3 coding style (#6717)
I updated .clang-format and ran clang-format 14 over the src and test directories to standardize the code base. In general I let clang-format have it's way, and added markup to prevent formatting of code that would break or be completely unreadable if formatted. The script I ran for the src directory is added as build-scripts/clang-format-src.sh This fixes: #6592 #6593 #6594
This commit is contained in:
parent
14b902faca
commit
5750bcb174
781 changed files with 51659 additions and 55763 deletions
|
@ -35,7 +35,7 @@
|
|||
updated SDL can transparently take advantage of them, but your program will
|
||||
not without this feature. Think hard before turning it off.
|
||||
*/
|
||||
#ifdef SDL_DYNAMIC_API /* Tried to force it on the command line? */
|
||||
#ifdef SDL_DYNAMIC_API /* Tried to force it on the command line? */
|
||||
#error Nope, you have to edit this file to force this off.
|
||||
#endif
|
||||
|
||||
|
@ -43,13 +43,13 @@
|
|||
#include "TargetConditionals.h"
|
||||
#endif
|
||||
|
||||
#if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE /* probably not useful on iOS. */
|
||||
#if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE /* probably not useful on iOS. */
|
||||
#define SDL_DYNAMIC_API 0
|
||||
#elif defined(__ANDROID__) /* probably not useful on Android. */
|
||||
#define SDL_DYNAMIC_API 0
|
||||
#elif defined(__EMSCRIPTEN__) && __EMSCRIPTEN__ /* probably not useful on Emscripten. */
|
||||
#elif defined(__EMSCRIPTEN__) && __EMSCRIPTEN__ /* probably not useful on Emscripten. */
|
||||
#define SDL_DYNAMIC_API 0
|
||||
#elif defined(SDL_BUILDING_WINRT) && SDL_BUILDING_WINRT /* probably not useful on WinRT, given current .dll loading restrictions */
|
||||
#elif defined(SDL_BUILDING_WINRT) && SDL_BUILDING_WINRT /* probably not useful on WinRT, given current .dll loading restrictions */
|
||||
#define SDL_DYNAMIC_API 0
|
||||
#elif defined(__PS2__) && __PS2__
|
||||
#define SDL_DYNAMIC_API 0
|
||||
|
@ -58,15 +58,15 @@
|
|||
#elif defined(__riscos__) && __riscos__ /* probably not useful on RISC OS, since dlopen() can't be used when using static linking. */
|
||||
#define SDL_DYNAMIC_API 0
|
||||
#elif defined(__clang_analyzer__)
|
||||
#define SDL_DYNAMIC_API 0 /* Turn off for static analysis, so reports are more clear. */
|
||||
#define SDL_DYNAMIC_API 0 /* Turn off for static analysis, so reports are more clear. */
|
||||
#elif defined(__VITA__)
|
||||
#define SDL_DYNAMIC_API 0 /* vitasdk doesn't support dynamic linking */
|
||||
#define SDL_DYNAMIC_API 0 /* vitasdk doesn't support dynamic linking */
|
||||
#elif defined(__NGAGE__)
|
||||
#define SDL_DYNAMIC_API 0 /* The N-Gage doesn't support dynamic linking either */
|
||||
#define SDL_DYNAMIC_API 0 /* The N-Gage doesn't support dynamic linking either */
|
||||
#elif defined(__3DS__)
|
||||
#define SDL_DYNAMIC_API 0 /* devkitARM doesn't support dynamic linking */
|
||||
#define SDL_DYNAMIC_API 0 /* devkitARM doesn't support dynamic linking */
|
||||
#elif defined(DYNAPI_NEEDS_DLOPEN) && !defined(HAVE_DLOPEN)
|
||||
#define SDL_DYNAMIC_API 0 /* we need dlopen(), but don't have it.... */
|
||||
#define SDL_DYNAMIC_API 0 /* we need dlopen(), but don't have it.... */
|
||||
#endif
|
||||
|
||||
/* everyone else. This is where we turn on the API if nothing forced it off. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue