Call std::abort in llassert_always. LL_ERRS will already terminate/crass the processes, but putting a [noreturn] function, even if never reached, makes it obvious to the compiler that the program will abort.

master
Nicky 2022-02-10 10:34:36 +01:00
parent fd98fbf0a5
commit 755c765263
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@ const int LL_ERR_NOERR = 0;
#endif // !_DEBUG
#define llassert_always_msg(func, msg) if (LL_UNLIKELY(!(func))) LL_ERRS() << "ASSERT (" << msg << ")" << LL_ENDL
#define llassert_always_msg(func, msg) if (LL_UNLIKELY(!(func))) { LL_ERRS() << "ASSERT (" << msg << ")" << LL_ENDL; /*<FS:ND> call abort, this will not be reached but signaled GCC after this line the program exists*/ std::abort(); }
#define llassert_always(func) llassert_always_msg(func, #func)