X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=libs%2Fstringio.h;h=ac680259d73338fd89bf408f07329ada6c55dbcd;hb=bcec26f643953107b21f0e02bc494d9f72f13c18;hp=ff1a3a67a1300f58ff4b7cefdd7dc01c26b069e2;hpb=9273c45f6899a22998839064d4f04f1ea66d5af9;p=xonotic%2Fnetradiant.git diff --git a/libs/stringio.h b/libs/stringio.h index ff1a3a67..ac680259 100644 --- a/libs/stringio.h +++ b/libs/stringio.h @@ -219,7 +219,7 @@ inline bool string_parse_size( const char* string, std::size_t& i ){ } -#define RETURN_FALSE_IF_FAIL( expression ) if ( !expression ) {return false; }else +#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";