From 7e222be7a2a7a0137d8a624c21a17603a669f1c0 Mon Sep 17 00:00:00 2001 From: Francois Fleuret Date: Fri, 30 Jun 2017 17:13:44 +0200 Subject: [PATCH] Fixes to deal with newer png lib and C++11, as suggested by Mark van Rossum. --- Makefile | 2 +- rgb_image.cc | 2 +- shape.h | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) 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; -- 2.39.5