From: Francois Fleuret Date: Fri, 30 Jun 2017 15:13:44 +0000 (+0200) Subject: Fixes to deal with newer png lib and C++11, as suggested by Mark van Rossum. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=svrt.git;a=commitdiff_plain;h=7e222be7a2a7a0137d8a624c21a17603a669f1c0 Fixes to deal with newer png lib and C++11, as suggested by Mark van Rossum. --- diff --git a/Makefile b/Makefile index d483ba5..0cf2320 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ # You should have received a copy of the GNU General Public License # along with selector. If not, see . -LDFLAGS=-lm -ljpeg -lpng +LDFLAGS=-lm -ljpeg -lpng12 ifeq ($(DEBUG),yes) OPTIMIZE_FLAG = -ggdb3 -DDEBUG -fno-omit-frame-pointer diff --git a/rgb_image.cc b/rgb_image.cc index f803363..8922c4d 100644 --- a/rgb_image.cc +++ b/rgb_image.cc @@ -25,7 +25,7 @@ #include #include -#include +#include #include "jpeg_misc.h" #include "rgb_image.h" diff --git a/shape.h b/shape.h index 5440197..190e7bd 100644 --- a/shape.h +++ b/shape.h @@ -31,7 +31,13 @@ class Shape { static const int margin = 1; static const int nb_max_pixels = Vignette::width * Vignette::height; + +#if __cplusplus >= 201103L + static constexpr scalar_t gap_max = 0.25; +#else static const scalar_t gap_max = 0.25; +#endif + int n_pixels1, n_pixels2, n_pixels3, n_pixels4; int nb_pixels; scalar_t xc, yc;