mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-22 19:03:44 +02:00
Fixed compilation with GCC 4.9
This commit is contained in:
parent
fe1a586fb3
commit
9e113d88c7
@ -144,6 +144,9 @@ SDL_Surface *loadPNG(const std::string &path) {
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Note: GCC 4.9 doesn't want to jump over 'rowPointers' with goto
|
||||||
|
// if it is in the outer scope.
|
||||||
|
{
|
||||||
// Compute row pointers.
|
// Compute row pointers.
|
||||||
png_bytep rowPointers[height];
|
png_bytep rowPointers[height];
|
||||||
for (png_uint_32 y = 0; y < height; y++) {
|
for (png_uint_32 y = 0; y < height; y++) {
|
||||||
@ -153,6 +156,7 @@ SDL_Surface *loadPNG(const std::string &path) {
|
|||||||
|
|
||||||
// Read the entire image in one go.
|
// Read the entire image in one go.
|
||||||
png_read_image(png, rowPointers);
|
png_read_image(png, rowPointers);
|
||||||
|
}
|
||||||
|
|
||||||
// Read rest of file, and get additional chunks in the info struct.
|
// Read rest of file, and get additional chunks in the info struct.
|
||||||
// Note: We got all we need, so skip this step.
|
// Note: We got all we need, so skip this step.
|
||||||
|
Loading…
Reference in New Issue
Block a user