From b2ffa116f5bd695ec85ac8a98a0af6f22c643dd4 Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Sat, 6 Dec 2008 14:47:00 +0000 Subject: [PATCH] Modified MAX to play nice with GLib's MAX --- src/common/util.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/common/util.hpp b/src/common/util.hpp index c71ba3b6a..00c7bb638 100644 --- a/src/common/util.hpp +++ b/src/common/util.hpp @@ -238,7 +238,8 @@ namespace util #define INSTANCEOF(CLASS, EXPR) (dynamic_cast (EXPR)) /** the inevitalbe MAX macro, sometimes still necessary in template code */ -#define MAX(A,B) (A < B) ? (B) : (A) - +#ifndef MAX // this is present to make this definition play nice with GLib +#define MAX(A,B) ((A < B) ? (B) : (A)) +#endif #endif /*UTIL_HPP_*/