Fixed ticket #44 with name collision

This commit is contained in:
Christophe Riccio 2011-02-21 15:23:10 +00:00
parent ce78b77f86
commit ad84fb61f5
3 changed files with 23 additions and 11 deletions

18
glm/core/_fixes.hpp Normal file
View File

@ -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

View File

@ -10,6 +10,8 @@
#ifndef glm_core_func_common #ifndef glm_core_func_common
#define glm_core_func_common #define glm_core_func_common
#include "_fixes.hpp"
namespace glm namespace glm
{ {
namespace test{ namespace test{

View File

@ -7,19 +7,11 @@
// File : glm/glm.hpp // File : glm/glm.hpp
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
#include "core/_fixes.hpp"
#ifndef glm_glm #ifndef glm_glm
#define 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 //! TODO: to delete
#define GLMvalType typename genType::value_type #define GLMvalType typename genType::value_type
//#define GLMcolType typename genType::col_type //#define GLMcolType typename genType::col_type
@ -29,7 +21,7 @@
#include <climits> #include <climits>
#include <cfloat> #include <cfloat>
#include <limits> #include <limits>
#include "./setup.hpp" #include "setup.hpp"
#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_CORE_INCLUDED_DISPLAYED)) #if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_CORE_INCLUDED_DISPLAYED))
# define GLM_MESSAGE_CORE_INCLUDED_DISPLAYED # define GLM_MESSAGE_CORE_INCLUDED_DISPLAYED