Added GLM_HAS_TRIVIAL_QUERIES define

This commit is contained in:
Christophe Riccio
2014-11-15 21:59:46 +01:00
parent 0ff773a46a
commit b90c4c430e
9 changed files with 63 additions and 59 deletions

View File

@@ -531,6 +531,10 @@
(GLM_LANG & GLM_LANG_CXX11_FLAG) || \
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC49)))
#define GLM_HAS_TRIVIAL_QUERIES (\
((GLM_LANG & GLM_LANG_CXX11_FLAG) && !(GLM_COMPILER & GLM_COMPILER_GCC)) || \
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC12)))
// OpenMP
#ifdef _OPENMP
# if GLM_COMPILER & GLM_COMPILER_GCC

View File

@@ -295,8 +295,8 @@ namespace detail
if(isPowerOfTwo(value))
return value;
genType const prev = highestBitValue(value);
genType const next = prev << 1;
genIUType const prev = highestBitValue(value);
genIUType const next = prev << 1;
return (next - value) < (value - prev) ? next : prev;
}