shorten some StringOutputStream uses

This commit is contained in:
Garux
2021-02-08 13:48:49 +03:00
parent b013f9954c
commit 02874bebee
6 changed files with 51 additions and 97 deletions

View File

@@ -256,15 +256,12 @@ void Pointfile_Parse( CPointfile& pointfile ){
const char* mapname = Map_Name( g_map );
StringOutputStream name( 256 );
name << PathExtensionless( mapname ) << ".lin";
size = LoadFile( name.c_str(), (void**)&data );
size = LoadFile( name( PathExtensionless( mapname ), ".lin" ), (void**)&data );
if ( size == -1 ) {
globalErrorStream() << "Pointfile " << name.c_str() << " not found\n";
/* try .pts (q1) */
name.clear();
name << PathExtensionless( mapname ) << ".pts";
size = LoadFile( name.c_str(), (void**)&data );
size = LoadFile( name( PathExtensionless( mapname ), ".pts" ), (void**)&data );
if ( size == -1 ) {
globalErrorStream() << "Pointfile " << name.c_str() << " not found\n";
return;