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:
parent
c3dfd4a4b1
commit
5533215019
2 changed files with 3 additions and 9 deletions
|
@ -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 */
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue