From b82b0683d5b3ee368db109f86a58fe3ac78d81fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Tue, 6 Jul 2021 15:01:38 +0200 Subject: [PATCH] MathUtil: Mark IntLog2 as constexpr Mostly everything else was already marked as constexpr, and the only function IntLog2 calls (CountLeadingZeros) is already constexpr. --- Source/Core/Common/MathUtil.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/Common/MathUtil.h b/Source/Core/Common/MathUtil.h index 22ad26e97b..9b31a9acd5 100644 --- a/Source/Core/Common/MathUtil.h +++ b/Source/Core/Common/MathUtil.h @@ -191,7 +191,7 @@ private: float MathFloatVectorSum(const std::vector&); // Rounds down. 0 -> undefined -inline int IntLog2(u64 val) +constexpr int IntLog2(u64 val) { return 63 - Common::CountLeadingZeros(val); }