From: TimePath Date: Fri, 29 Dec 2017 03:07:15 +0000 (+1100) Subject: Remove trailing spaces after `#` tokens X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=34cbf87edef249d8a4732db54f233ba4ffbea3d4;p=xonotic%2Fnetradiant.git Remove trailing spaces after `#` tokens --- diff --git a/contrib/brushexport/support.h b/contrib/brushexport/support.h index a5bd9655..1cf6099e 100644 --- a/contrib/brushexport/support.h +++ b/contrib/brushexport/support.h @@ -3,7 +3,7 @@ */ #ifdef HAVE_CONFIG_H -# include +#include #endif #include diff --git a/libs/debugging/debugging.h b/libs/debugging/debugging.h index e05ff31b..0e008b61 100644 --- a/libs/debugging/debugging.h +++ b/libs/debugging/debugging.h @@ -39,7 +39,7 @@ #define DEBUGGER_BREAKPOINT() raise( SIGTRAP ); #endif -#define STR( x ) # x +#define STR( x ) #x #define STR2( x ) STR( x ) #define FILE_LINE __FILE__ ":" STR2( __LINE__ ) @@ -116,8 +116,8 @@ inline DebugMessageHandler& globalDebugMessageHandler(){ globalDebugMessageHandler().getOutputStream() << FILE_LINE "\nruntime error: " << message << "\n"; \ if ( !globalDebugMessageHandler().handleMessage() ) { DEBUGGER_BREAKPOINT(); }} while ( 0 ) -#define ASSERT_NOTNULL( ptr ) ASSERT_MESSAGE( ptr != 0, "pointer \"" # ptr "\" is null" ) -#define ASSERT_TRUE( flag ) ASSERT_MESSAGE( !!(flag) == true, "condition \"" # flag "\" is false" ) +#define ASSERT_NOTNULL( ptr ) ASSERT_MESSAGE( ptr != 0, "pointer \"" #ptr "\" is null" ) +#define ASSERT_TRUE( flag ) ASSERT_MESSAGE( !!(flag) == true, "condition \"" #flag "\" is false" ) #else diff --git a/libs/generic/constant.h b/libs/generic/constant.h index ab64ec39..e7e7ba04 100644 --- a/libs/generic/constant.h +++ b/libs/generic/constant.h @@ -40,7 +40,7 @@ inline TextOutputStreamType& ostream_write( TextOutputStreamType& ostream, const return ostream_write( ostream, typename Type::Value( c ) ); } -#define TYPE_CONSTANT( name, value, type ) struct name ## _CONSTANT_ { typedef type Value; static Value evaluate() { return value; } }; typedef ConstantWrapper name +#define TYPE_CONSTANT( name, value, type ) struct name##_CONSTANT_ { typedef type Value; static Value evaluate() { return value; } }; typedef ConstantWrapper name #define STRING_CONSTANT( name, value ) TYPE_CONSTANT ( name, value, const char* ) #define INTEGER_CONSTANT( name, value ) TYPE_CONSTANT ( name, value, int ) #define UINT_CONSTANT( name, value ) TYPE_CONSTANT ( name, value, unsigned int ) diff --git a/libs/md5lib.h b/libs/md5lib.h index db9fd333..c54f2605 100644 --- a/libs/md5lib.h +++ b/libs/md5lib.h @@ -48,7 +48,7 @@ */ #ifndef md5_INCLUDED -# define md5_INCLUDED +#define md5_INCLUDED /* * This package supports both compile-time and run-time determination of CPU diff --git a/libs/md5lib/md5lib.c b/libs/md5lib/md5lib.c index f30d0958..eb047824 100644 --- a/libs/md5lib/md5lib.c +++ b/libs/md5lib/md5lib.c @@ -70,9 +70,9 @@ #undef BYTE_ORDER /* 1 = big-endian, -1 = little-endian, 0 = unknown */ #ifdef ARCH_IS_BIG_ENDIAN -# define BYTE_ORDER ( ARCH_IS_BIG_ENDIAN ? 1 : -1 ) +#define BYTE_ORDER ( ARCH_IS_BIG_ENDIAN ? 1 : -1 ) #else -# define BYTE_ORDER 0 +#define BYTE_ORDER 0 #endif #define T_MASK ( ( md5_word_t ) ~0 ) @@ -197,11 +197,11 @@ md5_process( md5_state_t *pms, const md5_byte_t *data /*[64]*/ ){ const md5_byte_t *xp = data; int i; -# if BYTE_ORDER == 0 +#if BYTE_ORDER == 0 X = xbuf; /* (dynamic only) */ -# else -# define xbuf X /* (static only) */ -# endif +#else +#define xbuf X /* (static only) */ +#endif for ( i = 0; i < 16; ++i, xp += 4 ) xbuf[i] = xp[0] + ( xp[1] << 8 ) + ( xp[2] << 16 ) + ( xp[3] << 24 ); } diff --git a/libs/splines/q_shared.h b/libs/splines/q_shared.h index 09a20b81..95c0cc5a 100644 --- a/libs/splines/q_shared.h +++ b/libs/splines/q_shared.h @@ -140,8 +140,8 @@ #undef ALIGN_ON #undef ALIGN_OFF -#define ALIGN_ON # pragma align( 16 ) -#define ALIGN_OFF # pragma align() +#define ALIGN_ON #pragma align( 16 ) +#define ALIGN_OFF #pragma align() #ifdef __cplusplus extern "C" { diff --git a/radiant/patchmanip.cpp b/radiant/patchmanip.cpp index 9c85927f..677abbd5 100644 --- a/radiant/patchmanip.cpp +++ b/radiant/patchmanip.cpp @@ -878,7 +878,7 @@ void DoNewPatchDlg( EPatchPrefab prefab, int minrows, int mincols, int defrows, { auto combo = ui::ComboBoxText(ui::New); -#define D_ITEM( x ) if ( x >= mincols && ( !maxcols || x <= maxcols ) ) gtk_combo_box_text_append_text( combo, # x ) +#define D_ITEM( x ) if ( x >= mincols && ( !maxcols || x <= maxcols ) ) gtk_combo_box_text_append_text( combo, #x ) D_ITEM( 3 ); D_ITEM( 5 ); D_ITEM( 7 ); @@ -904,7 +904,7 @@ void DoNewPatchDlg( EPatchPrefab prefab, int minrows, int mincols, int defrows, } { auto combo = ui::ComboBoxText(ui::New); -#define D_ITEM( x ) if ( x >= minrows && ( !maxrows || x <= maxrows ) ) gtk_combo_box_text_append_text( combo, # x ) +#define D_ITEM( x ) if ( x >= minrows && ( !maxrows || x <= maxrows ) ) gtk_combo_box_text_append_text( combo, #x ) D_ITEM( 3 ); D_ITEM( 5 ); D_ITEM( 7 ); diff --git a/tools/quake3/q3map2/q3map2.h b/tools/quake3/q3map2/q3map2.h index 7b677c83..d3a9432f 100644 --- a/tools/quake3/q3map2/q3map2.h +++ b/tools/quake3/q3map2/q3map2.h @@ -2561,16 +2561,16 @@ Q_EXTERN bspAdvertisement_t bspAds[ MAX_MAP_ADVERTISEMENTS ]; allocated *= 2; \ if ( !allocated || allocated > 2147483647 / (int)sizeof( *ptr ) ) \ { \ - Error( # ptr " over 2 GB" ); \ + Error( #ptr " over 2 GB" ); \ } \ ptr = realloc( ptr, sizeof( *ptr ) * allocated ); \ if ( !ptr ) { \ - Error( # ptr " out of memory" ); } \ + Error( #ptr " out of memory" ); } \ } \ } \ while ( 0 ) -#define AUTOEXPAND_BY_REALLOC_BSP( suffix, def ) AUTOEXPAND_BY_REALLOC( bsp ## suffix, numBSP ## suffix, allocatedBSP ## suffix, def ) +#define AUTOEXPAND_BY_REALLOC_BSP( suffix, def ) AUTOEXPAND_BY_REALLOC( bsp##suffix, numBSP##suffix, allocatedBSP##suffix, def ) #define Image_LinearFloatFromsRGBFloat( c ) ( ( ( c ) <= 0.04045f ) ? ( c ) * ( 1.0f / 12.92f ) : (float)pow( ( ( c ) + 0.055f ) * ( 1.0f / 1.055f ), 2.4f ) ) #define Image_sRGBFloatFromLinearFloat( c ) ( ( ( c ) < 0.0031308f ) ? ( c ) * 12.92f : 1.055f * (float)pow( ( c ), 1.0f / 2.4f ) - 0.055f )