1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-22 17:49:43 +01:00

Use SDL_NORETURN

I misread SDL's code and thought that SDL's `begin_code.h` was internal
only to SDL. It turns out you get it when you include basically any
header, such as `SDL_stdinc.h`. So use it directly instead of copying it
for our own.
This commit is contained in:
Misa 2021-09-27 10:32:23 -07:00
parent c3dfd4a4b1
commit 5533215019
2 changed files with 3 additions and 9 deletions

View file

@ -1,14 +1,8 @@
#ifndef VVV_EXIT_H #ifndef VVV_EXIT_H
#define VVV_EXIT_H #define VVV_EXIT_H
#ifdef __GNUC__ #include <SDL_stdinc.h>
# define VVV_NORETURN __attribute__((noreturn))
#elif defined(_MSC_VER)
# define VVV_NORETURN __declspec(noreturn)
#else
# define VVV_NORETURN
#endif
VVV_NORETURN void VVV_exit(const int exit_code); SDL_NORETURN void VVV_exit(const int exit_code);
#endif /* VVV_EXIT_H */ #endif /* VVV_EXIT_H */

View file

@ -708,7 +708,7 @@ static void cleanup(void)
FILESYSTEM_deinit(); FILESYSTEM_deinit();
} }
VVV_NORETURN void VVV_exit(const int exit_code) SDL_NORETURN void VVV_exit(const int exit_code)
{ {
cleanup(); cleanup();
exit(exit_code); exit(exit_code);