Commit Graph

17 Commits (release-2.30.x)

Author SHA1 Message Date
Sam Lantinga 0fc3574464 Updated copyright for 2024
Sam Lantinga 0479df53ca Updated copyright for 2023
Pierre Wendling d0bbfdbfb8 Clang-Tidy fixes ()
(cherry picked from commit 3c501b963d)
Sam Lantinga b8d85c6939 Update for SDL3 coding style ()
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:




(cherry picked from commit 5750bcb174)
Sylvain Becker fb0ce375f0 Cleanup add brace ()
* Add braces after if conditions

* More add braces after if conditions

* Add braces after while() conditions

* Fix compilation because of macro being modified

* Add braces to for loop

* Add braces after if/goto

* Move comments up

* Remove extra () in the 'return ...;' statements

* More remove extra () in the 'return ...;' statements

* More remove extra () in the 'return ...;' statements after merge

* Fix inconsistent patterns are xxx == NULL vs !xxx

* More "{}" for "if() break;"  and "if() continue;"

* More "{}" after if() short statement

* More "{}" after "if () return;" statement

* More fix inconsistent patterns are xxx == NULL vs !xxx

* Revert some modificaion on SDL_RLEaccel.c

* SDL_RLEaccel: no short statement

* Cleanup 'if' where the bracket is in a new line

* Cleanup 'while' where the bracket is in a new line

* Cleanup 'for' where the bracket is in a new line

* Cleanup 'else' where the bracket is in a new line

(cherry picked from commit 6a2200823c to reduce conflicts merging between SDL2 and SDL3)
Cameron Cawley 0cca71a846 Use SDLCALL for callbacks in public APIs
Sam Lantinga 120c76c84b Updated copyright for 2022
Christian Rauch 3f25704592 test: portable 64bit address format specifier
Sam Lantinga 9130f7c377 Updated copyright for 2021
Sam Lantinga a8780c6a28 Updated copyright date for 2020
Ozkan Sezer 6f8910e398 minor warning fixes.
Sam Lantinga 5e13087b0f Updated copyright for 2019
Sam Lantinga e3cc5b2c6b Updated copyright for 2018
Sam Lantinga 45b774e3f7 Updated copyright for 2017
Sam Lantinga 3ac201cf7f Fixed bug 3319 - Getting the POSIX out of testqsort.c
Simon Hug

There's a call to the POSIX function random in test/testqsort.c. Naturally, Windows doesn't do that. The attached patch changes the call to the SDLtest framework random functions and adds some seed control.

Looking at SDLTest_RandomInitTime, I just want to say that 'srand((unsigned int)time(NULL)); a=rand(); srand(clock()); b=rand();' is an absolutely terrible way to initialize a seed on Windows because of its terrible LCG.
Philipp Wiesemann 43594e3f3d Removed unnecessary include statement in test program.
Ryan C. Gordon deb2acbcd9 A simple test program for SDL_qsort().