summaryrefslogtreecommitdiff
path: root/includes/generic.h
diff options
context:
space:
mode:
Diffstat (limited to 'includes/generic.h')
-rw-r--r--includes/generic.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/includes/generic.h b/includes/generic.h
index 5abb92b..41f3a5f 100644
--- a/includes/generic.h
+++ b/includes/generic.h
@@ -74,9 +74,28 @@ typedef Uint32 DWord;
#endif
extern char verbosity;
-void printm(int level, char * fmt, ...);
char ** split(char * s, char t);
+#ifdef __cplusplus
+class String;
+void printm(int level, String fmt, ...);
+#include "String.h"
+
+#ifndef MAX
+template<class T>
+inline T MAX(T a, T b) {
+ return a < b ? b : a;
+}
+#endif
+
+#ifndef MIN
+template<class T>
+inline T MIN(T a, T b) {
+ return a > b ? b : a;
+}
+#endif
+
+#else
#ifndef MAX
#define MAX(__a,__b) ((__a)<(__b)?(__b):(__a))
#endif
@@ -86,3 +105,5 @@ char ** split(char * s, char t);
#endif
#endif
+
+#endif