tweak StringOutputStream use

auto str = StringOutputStream()(bla) use form was not doing copy elision or move, but copy
This commit is contained in:
Garux
2024-01-29 16:54:08 +06:00
parent b4e44bc8ed
commit df02774ff5
122 changed files with 984 additions and 1204 deletions

View File

@@ -273,7 +273,7 @@ EntityClass *Eclass_InitFromText( const char *text ){
e->m_comments = text;
setSpecialLoad( e, "model=", e->m_modelpath );
e->m_modelpath = StringOutputStream( 256 )( PathCleaned( e->m_modelpath.c_str() ) ).c_str();
e->m_modelpath = StringStream<64>( PathCleaned( e->m_modelpath.c_str() ) );
if ( !e->fixedsize ) {
EntityClass_insertAttribute( *e, "angle", EntityClassAttribute( "direction", "Direction" ) );
@@ -296,7 +296,7 @@ void Eclass_ScanFile( EntityClassCollector& collector, const char *filename ){
globalErrorStream() << "ScanFile: " << filename << " not found\n";
return;
}
globalOutputStream() << "ScanFile: " << filename << "\n";
globalOutputStream() << "ScanFile: " << filename << '\n';
enum EParserState
{
@@ -367,7 +367,7 @@ void Eclass_ScanFile( EntityClassCollector& collector, const char *filename ){
collector.insert( e );
}
else{
globalErrorStream() << "Error parsing: " << debugname << " in " << filename << "\n";
globalErrorStream() << "Error parsing: " << debugname << " in " << filename << '\n';
}
buffer.clear();