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 ) if ( !( expression ) ) { printParseError( FILE_LINE "\nparse failed: " # expression "\n" ); return false; }
bool EntityClassDoom3_parseToken( Tokeniser& tokeniser ){
const char* token = tokeniser.getToken();
return true;
}
-bool EntityClassDoom3_parseString( Tokeniser& tokeniser, CopiedString& s ){
+bool EntityClassDoom3_parseString( Tokeniser& tokeniser, std::string& s ){
const char* token = tokeniser.getToken();
PARSE_RETURN_FALSE_IF_FAIL( token != 0 );
s = token;
{
public:
bool m_resolved;
-CopiedString m_mesh;
-CopiedString m_skin;
-CopiedString m_parent;
-typedef std::map<CopiedString, CopiedString> Anims;
+std::string m_mesh;
+std::string m_skin;
+std::string m_parent;
+typedef std::map<std::string, std::string> Anims;
Anims m_anims;
Model() : m_resolved( false ){
}
};
-typedef std::map<CopiedString, Model> Models;
+typedef std::map<std::string, Model> Models;
Models g_models;
}
}
else if ( string_equal( parameter, "anim" ) ) {
- CopiedString animName;
+ std::string animName;
PARSE_RETURN_FALSE_IF_FAIL( EntityClassDoom3_parseString( tokeniser, animName ) );
const char* animFile;
PARSE_RETURN_FALSE_IF_FAIL( EntityClassDoom3_parseString( tokeniser, animFile ) );
StringOutputStream usage( 256 );
StringOutputStream description( 256 );
- CopiedString* currentDescription = 0;
+ std::string* currentDescription = 0;
StringOutputStream* currentString = 0;
for (;; )
PARSE_RETURN_FALSE_IF_FAIL( EntityClassDoom3_parseString( tokeniser, key ) );
const char* last = string_findFirstSpaceOrTab( key );
- CopiedString first( StringRange( key, last ) );
+ std::string first( StringRange( key, last ) );
if ( !string_empty( last ) ) {
last = string_findFirstNonSpaceOrTab( last );
// end ignore prey entity keys
else
{
- CopiedString tmp( key );
+ std::string tmp( key );
ASSERT_MESSAGE( !string_equal_n( key, "editor_", 7 ), "unsupported editor key: " << makeQuoted( key ) );
EntityClassAttribute& attribute = EntityClass_insertAttribute( entityClass, key ).second;
attribute.m_type = "string";
if ( blockType == 0 ) {
return true;
}
- CopiedString tmp( blockType );
+ std::string tmp( blockType );
if ( !EntityClassDoom3_parseBlock( tokeniser, tmp.c_str() ) ) {
globalErrorStream() << GlobalFileSystem().findFile( filename ) << filename << ":" << (unsigned int)tokeniser.getLine() << ": " << tmp.c_str() << " parse failed, skipping rest of file\n";
return false;