diff options
Diffstat (limited to 'runtime/utils.h')
-rw-r--r-- | runtime/utils.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/runtime/utils.h b/runtime/utils.h index 6a4198fcfc..6d52459ec8 100644 --- a/runtime/utils.h +++ b/runtime/utils.h @@ -140,9 +140,8 @@ struct TypeIdentity { template<typename T> static constexpr T RoundDown(T x, typename TypeIdentity<T>::type n) { return - // DCHECK(IsPowerOfTwo(n)) in a form acceptable in a constexpr function: - (kIsDebugBuild && !IsPowerOfTwo(n)) ? (LOG(FATAL) << n << " isn't a power of 2", T(0)) - : (x & -n); + DCHECK_CONSTEXPR(IsPowerOfTwo(n), , T(0)) + (x & -n); } template<typename T> |