Fixed prevPowerOfTwo build

This commit is contained in:
Christophe 2019-08-08 10:51:19 +02:00
parent 8bf26a2bb3
commit 29987a3100
2 changed files with 4 additions and 5 deletions

View File

@ -178,7 +178,7 @@ namespace detail
{
GLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, "'prevPowerOfTwo' only accept integer inputs");
return isPowerOfTwo(value) ? value : static_cast<genIUType>(1 << findMSB(value));
return isPowerOfTwo(value) ? value : static_cast<genIUType>(1) << static_cast<genIUType>(findMSB(value));
}
template<typename genIUType>

View File

@ -486,7 +486,7 @@ namespace findNSB
int test()
{
int Error = 0;
/*
Error += run<1, glm::uint8>();
Error += run<2, glm::uint8>();
Error += run<3, glm::uint8>();
@ -500,14 +500,13 @@ namespace findNSB
Error += run<1, glm::uint32>();
Error += run<2, glm::uint32>();
Error += run<3, glm::uint32>();
*/
Error += run<4, glm::uint32>();
/*
Error += run<1, glm::uint64>();
Error += run<2, glm::uint64>();
Error += run<3, glm::uint64>();
Error += run<4, glm::uint64>();
*/
return Error;
}
}//namespace findNSB