diff --git a/rtengine/dcraw.patch b/rtengine/dcraw.patch index e1603864a..db24e7fe8 100644 --- a/rtengine/dcraw.patch +++ b/rtengine/dcraw.patch @@ -1,5 +1,5 @@ ---- dcraw.c 2015-08-15 15:35:27 +0000 -+++ dcraw.cc 2015-08-16 13:46:33 +0000 +--- dcraw.c 2015-09-21 10:08:04 +0000 ++++ dcraw.cc 2015-10-14 14:29:55 +0000 @@ -1,3 +1,15 @@ +/*RT*/#include +/*RT*/#include @@ -148,10 +148,10 @@ -#define LIM(x,min,max) MAX(min,MIN(x,max)) -#define ULIM(x,y,z) ((y) < (z) ? LIM(x,y,z) : LIM(x,z,y)) -#define CLIP(x) LIM(x,0,65535) -+#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; }