summaryrefslogtreecommitdiff
path: root/src/macros.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/macros.h')
-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; }