tweak StringOutputStream use
auto str = StringOutputStream()(bla) use form was not doing copy elision or move, but copy
This commit is contained in:
@@ -356,7 +356,7 @@ static Image* LoadJPGBuff_( const void *src_buffer, int src_size ){
|
||||
jerr.pub.error_exit = my_jpeg_error_exit;
|
||||
|
||||
if ( setjmp( jerr.setjmp_buffer ) ) { //< TODO: use c++ exceptions instead of setjmp/longjmp to handle errors
|
||||
globalWarningStream() << "WARNING: JPEG library error: " << errormsg << "\n";
|
||||
globalWarningStream() << "WARNING: JPEG library error: " << errormsg << '\n';
|
||||
jpeg_destroy_decompress( &cinfo );
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -371,7 +371,7 @@ Image* LoadKTXBuff( PointerInputStream& istream ){
|
||||
}
|
||||
|
||||
if ( !decoder ) {
|
||||
globalErrorStream() << "LoadKTX: Image has an unsupported pixel type " << type << " or format " << format << "\n";
|
||||
globalErrorStream() << "LoadKTX: Image has an unsupported pixel type " << type << " or format " << format << '\n';
|
||||
image->release();
|
||||
return 0;
|
||||
}
|
||||
@@ -400,7 +400,7 @@ Image* LoadKTXBuff( PointerInputStream& istream ){
|
||||
KTX_DecodeETC1( istream, *image );
|
||||
break;
|
||||
default:
|
||||
globalErrorStream() << "LoadKTX: Image has an unsupported compressed format " << format << "\n";
|
||||
globalErrorStream() << "LoadKTX: Image has an unsupported compressed format " << format << '\n';
|
||||
image->release();
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user