summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2007-01-11 13:47:55 +0000
committerbjarni <bjarni@openttd.org>2007-01-11 13:47:55 +0000
commit49512cf4dc130b39137378048898405d15a42832 (patch)
treee9da2ca40c6fb66b9c93882c90f22e783f731f24 /src
parent582d8701ec2a8a6be2dd315238bfae1983c016a0 (diff)
downloadopenttd-49512cf4dc130b39137378048898405d15a42832.tar.xz
(svn r8061) -Fix r8055: obj-c can't handle templates
We will need to figure out a nicer solution for this, but now OSX compiles again
Diffstat (limited to 'src')
-rw-r--r--src/macros.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/macros.h b/src/macros.h
index 9c73f38f3..a66220154 100644
--- a/src/macros.h
+++ b/src/macros.h
@@ -20,11 +20,14 @@
#undef max
#endif
+/* Objective C don't like templates */
+#ifdef __cplusplus
template <typename T>
static inline T max(T a, T b)
{
return a >= b ? a : b;
}
+#endif
static inline int min(int a, int b) { if (a <= b) return a; return b; }