mirror of
https://github.com/g-truc/glm.git
synced 2024-11-27 02:34:35 +00:00
Fixed compiler detection ticket 75
This commit is contained in:
parent
b7babdb5bc
commit
63738b5cfa
@ -1206,7 +1206,7 @@ namespace glm
|
|||||||
{
|
{
|
||||||
GLM_STATIC_ASSERT(detail::type<genType>::is_float, "'mix' only accept floating-point inputs");
|
GLM_STATIC_ASSERT(detail::type<genType>::is_float, "'mix' only accept floating-point inputs");
|
||||||
|
|
||||||
#if(defined(GLM_COMPILER) && GLM_COMPILER & GLM_COMPILER_VC)
|
#if(GLM_COMPILER & GLM_COMPILER_VC)
|
||||||
return typename genType::bool_type(_isnan(x));
|
return typename genType::bool_type(_isnan(x));
|
||||||
#else
|
#else
|
||||||
return typename genType::bool_type(std::isnan(x));
|
return typename genType::bool_type(std::isnan(x));
|
||||||
@ -1257,7 +1257,7 @@ namespace glm
|
|||||||
{
|
{
|
||||||
GLM_STATIC_ASSERT(detail::type<genType>::is_float, "'isinf' only accept floating-point inputs");
|
GLM_STATIC_ASSERT(detail::type<genType>::is_float, "'isinf' only accept floating-point inputs");
|
||||||
|
|
||||||
#if(defined(GLM_COMPILER) && GLM_COMPILER & GLM_COMPILER_VC)
|
#if(GLM_COMPILER & GLM_COMPILER_VC)
|
||||||
return typename genType::bool_type(_fpclass(x) == _FPCLASS_NINF || _fpclass(x) == _FPCLASS_PINF);
|
return typename genType::bool_type(_fpclass(x) == _FPCLASS_NINF || _fpclass(x) == _FPCLASS_PINF);
|
||||||
#else
|
#else
|
||||||
return typename genType::bool_type(std::isinf(x));
|
return typename genType::bool_type(std::isinf(x));
|
||||||
|
@ -167,13 +167,13 @@
|
|||||||
// Report compiler detection
|
// Report compiler detection
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_COMPILER_DISPLAYED))
|
#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_COMPILER_DISPLAYED))
|
||||||
# define GLM_MESSAGE_COMPILER_DISPLAYED
|
# define GLM_MESSAGE_COMPILER_DISPLAYED
|
||||||
# if(defined(GLM_COMPILER) && GLM_COMPILER & GLM_COMPILER_VC)
|
# if(GLM_COMPILER & GLM_COMPILER_VC)
|
||||||
# pragma message("GLM: Visual C++ compiler detected")
|
# pragma message("GLM: Visual C++ compiler detected")
|
||||||
# elif(defined(GLM_COMPILER) && GLM_COMPILER & GLM_COMPILER_GCC)
|
# elif(GLM_COMPILER & GLM_COMPILER_GCC)
|
||||||
# pragma message("GLM: GCC compiler detected")
|
# pragma message("GLM: GCC compiler detected")
|
||||||
# elif(defined(GLM_COMPILER) && GLM_COMPILER & GLM_COMPILER_BC)
|
# elif(GLM_COMPILER & GLM_COMPILER_BC)
|
||||||
# pragma message("GLM: Borland compiler detected but not supported")
|
# pragma message("GLM: Borland compiler detected but not supported")
|
||||||
# elif(defined(GLM_COMPILER) && GLM_COMPILER & GLM_COMPILER_CODEWARRIOR)
|
# elif(GLM_COMPILER & GLM_COMPILER_CODEWARRIOR)
|
||||||
# pragma message("GLM: Codewarrior compiler detected but not supported")
|
# pragma message("GLM: Codewarrior compiler detected but not supported")
|
||||||
# else
|
# else
|
||||||
# pragma message("GLM: Compiler not detected")
|
# pragma message("GLM: Compiler not detected")
|
||||||
|
@ -16,9 +16,9 @@ template <typename genType>
|
|||||||
inline bool isfinite(
|
inline bool isfinite(
|
||||||
genType const & x)
|
genType const & x)
|
||||||
{
|
{
|
||||||
#ifdef GLM_COMPILER_VC
|
#if(GLM_COMPILER & GLM_COMPILER_VC)
|
||||||
return _finite(x);
|
return _finite(x);
|
||||||
#else//GLM_COMPILER_GCC
|
#else//(GLM_COMPILER & GLM_COMPILER_GCC)
|
||||||
return std::isfinite(x);
|
return std::isfinite(x);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -58,7 +58,7 @@ template <typename genType>
|
|||||||
inline bool isinf(
|
inline bool isinf(
|
||||||
genType const & x)
|
genType const & x)
|
||||||
{
|
{
|
||||||
#if(defined(GLM_COMPILER) && (GLM_COMPILER & GLM_COMPILER_VC))
|
#if(GLM_COMPILER & GLM_COMPILER_VC)
|
||||||
return _fpclass(x) == _FPCLASS_NINF || _fpclass(x) == _FPCLASS_PINF;
|
return _fpclass(x) == _FPCLASS_NINF || _fpclass(x) == _FPCLASS_PINF;
|
||||||
#else
|
#else
|
||||||
return std::isinf(x);
|
return std::isinf(x);
|
||||||
@ -99,7 +99,7 @@ inline detail::tvec4<bool> isinf(
|
|||||||
template <typename genType>
|
template <typename genType>
|
||||||
inline bool isnan(genType const & x)
|
inline bool isnan(genType const & x)
|
||||||
{
|
{
|
||||||
#if(defined(GLM_COMPILER) && (GLM_COMPILER & GLM_COMPILER_VC))
|
#if(GLM_COMPILER & GLM_COMPILER_VC)
|
||||||
return _isnan(x);
|
return _isnan(x);
|
||||||
#else
|
#else
|
||||||
return std::isnan(x);
|
return std::isnan(x);
|
||||||
|
Loading…
Reference in New Issue
Block a user