From c6620b415db72cbdf8833476a21af5190e15fa22 Mon Sep 17 00:00:00 2001 From: Marcin Bajor Date: Wed, 14 Oct 2015 10:51:27 +0200 Subject: [PATCH] Fix for build with C++11 flags --- rtengine/dcraw.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index add5b52..8e0a36d 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -136,10 +136,10 @@ const float d65_white[3] = { 0.950456, 1, 1.088754 }; #define SQR(x) rtengine::SQR(x) #define ABS(x) (((int)(x) ^ ((int)(x) >> 31)) - ((int)(x) >> 31)) -#define MIN(a,b) rtengine::min(a,static_cast(b)) -#define MAX(a,b) rtengine::max(a,static_cast(b)) -#define LIM(x,min,max) rtengine::LIM(x,static_cast(min),static_cast(max)) -#define ULIM(x,y,z) rtengine::ULIM(x,static_cast(y),static_cast(z)) +#define MIN(a,b) rtengine::min(a,static_cast<__typeof__(a)>(b)) +#define MAX(a,b) rtengine::max(a,static_cast<__typeof__(a)>(b)) +#define LIM(x,min,max) rtengine::LIM(x,static_cast<__typeof__(x)>(min),static_cast<__typeof__(x)>(max)) +#define ULIM(x,y,z) rtengine::ULIM(x,static_cast<__typeof__(x)>(y),static_cast<__typeof__(x)>(z)) #define CLIP(x) rtengine::CLIP(x) #define SWAP(a,b) { a=a+b; b=a-b; a=a-b; }