From ad84fb61f5889d97c3ec4a43809bd5eef1f1e4f7 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Mon, 21 Feb 2011 15:23:10 +0000 Subject: [PATCH] Fixed ticket #44 with name collision --- glm/core/_fixes.hpp | 18 ++++++++++++++++++ glm/core/func_common.hpp | 2 ++ glm/glm.hpp | 14 +++----------- 3 files changed, 23 insertions(+), 11 deletions(-) create mode 100644 glm/core/_fixes.hpp diff --git a/glm/core/_fixes.hpp b/glm/core/_fixes.hpp new file mode 100644 index 00000000..ba708003 --- /dev/null +++ b/glm/core/_fixes.hpp @@ -0,0 +1,18 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2011-02-21 +// Updated : 2011-02-21 +// Licence : This source is under MIT License +// File : glm/core/_fixes.hpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +//! Workaround for compatibility with other libraries +#ifdef max +#undef max +#endif + +//! Workaround for compatibility with other libraries +#ifdef min +#undef min +#endif diff --git a/glm/core/func_common.hpp b/glm/core/func_common.hpp index df3ac062..c9cdc8ba 100644 --- a/glm/core/func_common.hpp +++ b/glm/core/func_common.hpp @@ -10,6 +10,8 @@ #ifndef glm_core_func_common #define glm_core_func_common +#include "_fixes.hpp" + namespace glm { namespace test{ diff --git a/glm/glm.hpp b/glm/glm.hpp index 67b20753..26a182ba 100644 --- a/glm/glm.hpp +++ b/glm/glm.hpp @@ -7,19 +7,11 @@ // File : glm/glm.hpp /////////////////////////////////////////////////////////////////////////////////////////////////// +#include "core/_fixes.hpp" + #ifndef glm_glm #define glm_glm -//! Workaround for compatibility with other libraries -#ifdef max -#undef max -#endif - -//! Workaround for compatibility with other libraries -#ifdef min -#undef min -#endif - //! TODO: to delete #define GLMvalType typename genType::value_type //#define GLMcolType typename genType::col_type @@ -29,7 +21,7 @@ #include #include #include -#include "./setup.hpp" +#include "setup.hpp" #if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_CORE_INCLUDED_DISPLAYED)) # define GLM_MESSAGE_CORE_INCLUDED_DISPLAYED