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
#define VVV_EXIT_H
#ifdef __GNUC__
# define VVV_NORETURN __attribute__((noreturn))
#elif defined(_MSC_VER)
# define VVV_NORETURN __declspec(noreturn)
#else
# define VVV_NORETURN
#endif
#include <SDL_stdinc.h>
VVV_NORETURN void VVV_exit(const int exit_code);
SDL_NORETURN void VVV_exit(const int exit_code);
#endif /* VVV_EXIT_H */

View File

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