Integrate C++11 branch into 5_1-new
This commit is contained in:
@@ -60,7 +60,7 @@ void RageFile_JPEG_init_source( j_decompress_ptr cinfo )
|
||||
{
|
||||
RageFile_source_mgr *src = (RageFile_source_mgr *) cinfo->src;
|
||||
src->start_of_file = true;
|
||||
src->pub.next_input_byte = NULL;
|
||||
src->pub.next_input_byte = nullptr;
|
||||
src->pub.bytes_in_buffer = 0;
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ static RageSurface *RageSurface_Load_JPEG( RageFile *f, const char *fn, char err
|
||||
jerr.pub.error_exit = my_error_exit;
|
||||
jerr.pub.output_message = my_output_message;
|
||||
|
||||
RageSurface *volatile img = NULL; /* volatile to prevent possible problems with setjmp */
|
||||
RageSurface *volatile img = nullptr; /* volatile to prevent possible problems with setjmp */
|
||||
|
||||
if( setjmp(jerr.setjmp_buffer) )
|
||||
{
|
||||
@@ -124,7 +124,7 @@ static RageSurface *RageSurface_Load_JPEG( RageFile *f, const char *fn, char err
|
||||
|
||||
jpeg_destroy_decompress( &cinfo );
|
||||
delete img;
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
/* Now we can initialize the JPEG decompression object. */
|
||||
@@ -153,7 +153,7 @@ static RageSurface *RageSurface_Load_JPEG( RageFile *f, const char *fn, char err
|
||||
case JCS_CMYK:
|
||||
sprintf( errorbuf, "Color format \"%s\" not supported", cinfo.jpeg_color_space == JCS_YCCK? "YCCK":"CMYK" );
|
||||
jpeg_destroy_decompress( &cinfo );
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
default:
|
||||
cinfo.out_color_space = JCS_RGB;
|
||||
@@ -206,7 +206,7 @@ RageSurfaceUtils::OpenResult RageSurface_Load_JPEG( const RString &sPath, RageSu
|
||||
|
||||
char errorbuf[1024];
|
||||
ret = RageSurface_Load_JPEG( &f, sPath, errorbuf );
|
||||
if( ret == NULL )
|
||||
if( ret == nullptr )
|
||||
{
|
||||
error = errorbuf;
|
||||
return RageSurfaceUtils::OPEN_UNKNOWN_FILE_FORMAT; // XXX
|
||||
|
||||
Reference in New Issue
Block a user