aboutsummaryrefslogtreecommitdiffstats
path: root/community/rawtherapee/c++11.patch
blob: 86a6ff0717cbd1c4efb8c672b02da6d1a26a68b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From c6620b415db72cbdf8833476a21af5190e15fa22 Mon Sep 17 00:00:00 2001
From: Marcin Bajor <marcin.bajor@gmail.com>
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<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 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; }