mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-03-20 15:51:07 +01: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:
@@ -11,16 +11,15 @@
|
||||
*/
|
||||
|
||||
/* Test program to test dynamic loading with the loadso subsystem.
|
||||
*/
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
typedef int (*fntype) (const char *);
|
||||
typedef int (*fntype)(const char *);
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int retval = 0;
|
||||
int hello = 0;
|
||||
@@ -54,13 +53,13 @@ main(int argc, char *argv[])
|
||||
lib = SDL_LoadObject(libname);
|
||||
if (lib == NULL) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_LoadObject('%s') failed: %s\n",
|
||||
libname, SDL_GetError());
|
||||
libname, SDL_GetError());
|
||||
retval = 3;
|
||||
} else {
|
||||
fn = (fntype) SDL_LoadFunction(lib, symname);
|
||||
fn = (fntype)SDL_LoadFunction(lib, symname);
|
||||
if (fn == NULL) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_LoadFunction('%s') failed: %s\n",
|
||||
symname, SDL_GetError());
|
||||
symname, SDL_GetError());
|
||||
retval = 4;
|
||||
} else {
|
||||
SDL_Log("Found %s in %s at %p\n", symname, libname, fn);
|
||||
|
||||
Reference in New Issue
Block a user