mirror of
https://github.com/g-truc/glm.git
synced 2024-11-16 14:54:35 +00:00
Avoid problems if countof() is already defined as a macro.
This commit is contained in:
parent
40398d67cd
commit
b63ba72afa
@ -765,12 +765,12 @@ namespace glm
|
|||||||
namespace glm
|
namespace glm
|
||||||
{
|
{
|
||||||
template<typename T, std::size_t N>
|
template<typename T, std::size_t N>
|
||||||
constexpr std::size_t countof(T const (&)[N])
|
constexpr std::size_t _countof(T const (&)[N])
|
||||||
{
|
{
|
||||||
return N;
|
return N;
|
||||||
}
|
}
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
# define GLM_COUNTOF(arr) glm::countof(arr)
|
# define GLM_COUNTOF(arr) glm::_countof(arr)
|
||||||
#elif defined(_MSC_VER)
|
#elif defined(_MSC_VER)
|
||||||
# define GLM_COUNTOF(arr) _countof(arr)
|
# define GLM_COUNTOF(arr) _countof(arr)
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user