From 23ec489390bbf10016c1642f432e37b31e22faeb Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Wed, 1 May 2013 16:37:58 +0200 Subject: [PATCH] remove unneeded libpng version checks --- src/driver/pictureviewer/png.cpp | 8 -------- src/driver/screenshot.cpp | 4 ---- src/lcddisplay/lcddisplay.cpp | 4 ---- 3 files changed, 16 deletions(-) diff --git a/src/driver/pictureviewer/png.cpp b/src/driver/pictureviewer/png.cpp index e0361b673..4fa84dbe1 100644 --- a/src/driver/pictureviewer/png.cpp +++ b/src/driver/pictureviewer/png.cpp @@ -50,11 +50,7 @@ int int_png_load(const char *name, unsigned char **buffer, int* xp, int* yp, int fclose(fh); return(FH_ERROR_FORMAT); } -#if (PNG_LIBPNG_VER < 10500) - if (setjmp(png_ptr->jmpbuf)) -#else if (setjmp(png_jmpbuf(png_ptr))) -#endif { png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL); fclose(fh); @@ -158,11 +154,7 @@ int fh_png_getsize(const char *name,int *x,int *y, int /*wanted_width*/, int /*w return(FH_ERROR_FORMAT); } -#if (PNG_LIBPNG_VER < 10500) - if (setjmp(png_ptr->jmpbuf)) -#else if (setjmp(png_jmpbuf(png_ptr))) -#endif { png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL); fclose(fh); diff --git a/src/driver/screenshot.cpp b/src/driver/screenshot.cpp index f5cc60c2c..8d85d6571 100644 --- a/src/driver/screenshot.cpp +++ b/src/driver/screenshot.cpp @@ -194,11 +194,7 @@ bool CScreenShot::SavePng() png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, (png_voidp)NULL, (png_error_ptr)NULL, (png_error_ptr)NULL); info_ptr = png_create_info_struct(png_ptr); -#if (PNG_LIBPNG_VER < 10500) - if (setjmp(png_ptr->jmpbuf)) -#else if (setjmp(png_jmpbuf(png_ptr))) -#endif { printf("CScreenShot::SavePng: %s save error\n", filename.c_str()); png_destroy_write_struct(&png_ptr, &info_ptr); diff --git a/src/lcddisplay/lcddisplay.cpp b/src/lcddisplay/lcddisplay.cpp index cf8293d2a..78343110c 100644 --- a/src/lcddisplay/lcddisplay.cpp +++ b/src/lcddisplay/lcddisplay.cpp @@ -457,11 +457,7 @@ bool CLCDDisplay::load_png(const char * const filename) png_destroy_read_struct(&png_ptr, (png_infopp)NULL, (png_infopp)NULL); else { -#if (PNG_LIBPNG_VER < 10500) - if (!(setjmp(png_ptr->jmpbuf))) -#else if (!setjmp(png_jmpbuf(png_ptr))) -#endif { png_init_io(png_ptr,fh);