mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
Use [[noreturn]]
This commit is contained in:
parent
5e6d144567
commit
6a05d63993
1 changed files with 2 additions and 4 deletions
|
@ -30,10 +30,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#include <eh.h>
|
#include <eh.h>
|
||||||
#endif
|
#endif
|
||||||
#define NORETURN __declspec(noreturn)
|
|
||||||
#define FUNCTION_NAME __FUNCTION__
|
#define FUNCTION_NAME __FUNCTION__
|
||||||
#else
|
#else
|
||||||
#define NORETURN __attribute__ ((__noreturn__))
|
|
||||||
#define FUNCTION_NAME __PRETTY_FUNCTION__
|
#define FUNCTION_NAME __PRETTY_FUNCTION__
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -48,7 +46,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
|
||||||
/* Abort program execution immediately
|
/* Abort program execution immediately
|
||||||
*/
|
*/
|
||||||
NORETURN extern void fatal_error_fn(
|
[[noreturn]] extern void fatal_error_fn(
|
||||||
const char *msg, const char *file,
|
const char *msg, const char *file,
|
||||||
unsigned int line, const char *function);
|
unsigned int line, const char *function);
|
||||||
|
|
||||||
|
@ -66,7 +64,7 @@ NORETURN extern void fatal_error_fn(
|
||||||
defined)
|
defined)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
NORETURN extern void sanity_check_fn(
|
[[noreturn]] extern void sanity_check_fn(
|
||||||
const char *assertion, const char *file,
|
const char *assertion, const char *file,
|
||||||
unsigned int line, const char *function);
|
unsigned int line, const char *function);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue