]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/eclass_doom3.cpp
GTK: wrap gtk_widget_set_size_request
[xonotic/netradiant.git] / radiant / eclass_doom3.cpp
index 620cc276808309c33c868327dfb7e8e78aa30c62..2fde638181ef36f32b459dcb2b5402721167630e 100644 (file)
@@ -84,7 +84,7 @@ inline void printParseError( const char* message ){
        globalErrorStream() << message;
 }
 
-#define PARSE_RETURN_FALSE_IF_FAIL( expression ) if ( !( expression ) ) { printParseError( FILE_LINE "\nparse failed: " # expression "\n" ); return false; } else
+#define PARSE_RETURN_FALSE_IF_FAIL(expression) do { if (!( expression)) { printParseError(FILE_LINE "\nparse failed: " #expression "\n"); return false; } } while (0)
 
 bool EntityClassDoom3_parseToken( Tokeniser& tokeniser ){
        const char* token = tokeniser.getToken();
@@ -502,7 +502,9 @@ static bool EntityClass_parse( EntityClass& entityClass, Tokeniser& tokeniser ){
                else
                {
                        CopiedString tmp( key );
-                       ASSERT_MESSAGE( !string_equal_n( key, "editor_", 7 ), "unsupported editor key: " << makeQuoted( key ) );
+                       if ( string_equal_n( key, "editor_", 7 ) ) {
+                               globalErrorStream() << "unsupported editor key " << makeQuoted( key ) ;
+                       }
                        EntityClassAttribute& attribute = EntityClass_insertAttribute( entityClass, key ).second;
                        attribute.m_type = "string";
                        const char* value;