X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=libs%2Fstringio.h;h=47772ee47845d139e9bac1e625811a893249bbc1;hb=HEAD;hp=9003bca8dc030b6477201f8cfd0450fe83858945;hpb=00a7e0326354f7837338661c2307412f5beba9fb;p=xonotic%2Fnetradiant.git diff --git a/libs/stringio.h b/libs/stringio.h index 9003bca8..544b4336 100644 --- a/libs/stringio.h +++ b/libs/stringio.h @@ -220,7 +220,7 @@ inline bool string_parse_size( const char* string, std::size_t& i ){ } -#define RETURN_FALSE_IF_FAIL(expression) do { if (!(expression)) return false; } while (0) +#define RETURN_FALSE_IF_FAIL( expression ) do{ if ( !expression ) {return false; } }while( 0 ) inline void Tokeniser_unexpectedError( Tokeniser& tokeniser, const char* token, const char* expected ){ globalErrorStream() << Unsigned( tokeniser.getLine() ) << ":" << Unsigned( tokeniser.getColumn() ) << ": parse error at '" << ( token != 0 ? token : "#EOF" ) << "': expected '" << expected << "'\n"; @@ -237,7 +237,7 @@ inline bool Tokeniser_getFloat( Tokeniser& tokeniser, float& f ){ globalErrorStream() << "Warning: " << Unsigned( tokeniser.getLine() ) << ":" << Unsigned( tokeniser.getColumn() ) << ": expected parse problem at '" << token << "': wanted '#number'\nProcessing anyway\n"; #define GARUX_DISABLE_QNAN_FALLBACK #ifndef GARUX_DISABLE_QNAN_FALLBACK - *strstr( token, ".#" ) = '\0'; +// *strstr( token, ".#" ) = '\0'; #endif return true; }