mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-17 21:25:40 +00:00
(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
This commit is contained in:
parent
8694ad9e0d
commit
f348fc7b4c
@ -20,11 +20,14 @@
|
|||||||
#undef max
|
#undef max
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Objective C don't like templates */
|
||||||
|
#ifdef __cplusplus
|
||||||
template <typename T>
|
template <typename T>
|
||||||
static inline T max(T a, T b)
|
static inline T max(T a, T b)
|
||||||
{
|
{
|
||||||
return a >= b ? a : b;
|
return a >= b ? a : b;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static inline int min(int a, int b) { if (a <= b) return a; return b; }
|
static inline int min(int a, int b) { if (a <= b) return a; return b; }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user