Browse Source

Fixed ticket #44 with name collision

Christophe Riccio 15 years ago
parent
commit
ad84fb61f5
3 changed files with 23 additions and 11 deletions
  1. 18 0
      glm/core/_fixes.hpp
  2. 2 0
      glm/core/func_common.hpp
  3. 3 11
      glm/glm.hpp

+ 18 - 0
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

+ 2 - 0
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{

+ 3 - 11
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 <climits>
 #include <cfloat>
 #include <limits>
-#include "./setup.hpp"
+#include "setup.hpp"
 
 #if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_CORE_INCLUDED_DISPLAYED))
 #	define GLM_MESSAGE_CORE_INCLUDED_DISPLAYED