diff options
| author | Léo Lam <leo@leolam.fr> | 2021-07-06 15:01:38 +0200 |
|---|---|---|
| committer | Léo Lam <leo@leolam.fr> | 2021-07-06 15:01:38 +0200 |
| commit | b82b0683d5b3ee368db109f86a58fe3ac78d81fa (patch) | |
| tree | d76ee784bb9fc09206d6a1447ddd554b819b14e2 /Source | |
| parent | ffdc8538a162b1ca56e3943c5a78c02358053b2a (diff) | |
MathUtil: Mark IntLog2 as constexpr
Mostly everything else was already marked as constexpr, and the only
function IntLog2 calls (CountLeadingZeros) is already constexpr.
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/Common/MathUtil.h | 2 |
1 files changed, 1 insertions, 1 deletions
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<float>&); // Rounds down. 0 -> undefined -inline int IntLog2(u64 val) +constexpr int IntLog2(u64 val) { return 63 - Common::CountLeadingZeros(val); } |
