Replace the _noreturn macro with the C++ native attribute [[noreturn]]
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
c099877c35
commit
8598b1e8fc
@ -118,7 +118,7 @@ bool log_text_console_enabled()
|
||||
|
||||
static bool g_check_already_failed = false;
|
||||
|
||||
_noreturn bool __check_failed(const char* file, const char* line, const char* func, const char* expr)
|
||||
[[noreturn]] bool __check_failed(const char* file, const char* line, const char* func, const char* expr)
|
||||
{
|
||||
if (!g_check_already_failed)
|
||||
{ // Avoid endlessly failing when trying to report a failed check.
|
||||
|
@ -3,4 +3,3 @@
|
||||
#define _weak __attribute__((weak))
|
||||
#define _format(n, m) __attribute__((format(printf, n, m)))
|
||||
#define _align(x) __attribute__((aligned(x)))
|
||||
#define _noreturn __attribute__((noreturn))
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
#include <luna/Attributes.h>
|
||||
|
||||
extern _noreturn bool __check_failed(const char* file, const char* line, const char* func, const char* expr);
|
||||
[[noreturn]] extern bool __check_failed(const char* file, const char* line, const char* func, const char* expr);
|
||||
|
||||
#ifndef STRINGIZE_VALUE_OF
|
||||
#define STRINGIZE(x) #x
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <luna/Attributes.h>
|
||||
|
||||
_weak _noreturn bool __check_failed(const char*, const char*, const char*, const char*)
|
||||
_weak [[noreturn]] bool __check_failed(const char*, const char*, const char*, const char*)
|
||||
{
|
||||
__builtin_trap();
|
||||
}
|
Loading…
Reference in New Issue
Block a user