use standard [[ noreturn ]] attribute
add ENSURE macro
This commit is contained in:
parent
ef635cd95c
commit
5c5f698c28
|
|
@ -171,11 +171,11 @@ void ExpandWildcards( int *argc, char ***argv );
|
|||
|
||||
double I_FloatTime( void );
|
||||
|
||||
void Error( const char *error, ... )
|
||||
#ifdef __GNUC__
|
||||
__attribute__( ( noreturn ) )
|
||||
#endif
|
||||
;
|
||||
[[ noreturn ]] void Error( const char *error, ... );
|
||||
#define ENSURE( condition ) \
|
||||
(void) \
|
||||
( (!!( condition )) || \
|
||||
(Error( "%s:%u:%s: Condition '%s' failed.", __FILE__, __LINE__, __func__, #condition ), 0) )
|
||||
|
||||
FILE *SafeOpenWrite( const char *filename, const char *mode = "wb" );
|
||||
FILE *SafeOpenRead( const char *filename, const char *mode = "rb" );
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
#include "games.h"
|
||||
#include "bspfile_ibsp.h"
|
||||
#include "bspfile_rbsp.h"
|
||||
#include "cmdlib.h"
|
||||
|
||||
struct game_default : game_t
|
||||
{
|
||||
|
|
@ -521,6 +522,7 @@ struct game_ef : game_default
|
|||
homeBasePath = ".ef";
|
||||
magic = "elite";
|
||||
/* overwrite "ladder" entry; note: magic number */
|
||||
ENSURE( strEqual( surfaceParms[31].name, "ladder" ) );
|
||||
surfaceParms[31] =
|
||||
{ "ladder", E_CONT_LADDER, Q_CONT_SOLID, Q_SURF_LADDER, 0, C_DETAIL | C_TRANSLUCENT, C_SOLID };
|
||||
surfaceParms.insert( surfaceParms.end(), {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user