Fixed zero as null pointer constant

This commit is contained in:
Christophe Riccio 2018-01-05 00:03:29 +01:00
parent 26c395c78b
commit 6390805e6d
2 changed files with 17 additions and 1 deletions

View File

@ -508,6 +508,22 @@
# define GLM_HAS_OPENMP 0 # define GLM_HAS_OPENMP 0
#endif #endif
///////////////////////////////////////////////////////////////////////////////////
// nullptr
//
#if GLM_LANG & GLM_LANG_CXX0X_FLAG
# define GLM_HAS_NULLPTR 1
#else
# define GLM_HAS_NULLPTR 0
#endif
#if GLM_HAS_NULLPTR
# define GLM_NULLPTR nullptr
#else
# define GLM_NULLPTR 0
#endif
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
// Static assert // Static assert

View File

@ -25,7 +25,7 @@ namespace detail
char text[STRING_BUFFER]; char text[STRING_BUFFER];
va_list list; va_list list;
if(msg == 0) if(msg == GLM_NULLPTR)
return std::string(); return std::string();
va_start(list, msg); va_start(list, msg);