mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 01:59: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
|
#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 */
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue