From 034cb97a4210e655050f28848cd2687036962b54 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Mon, 22 Feb 2021 22:21:07 -0600 Subject: [PATCH] [ox/mc] Removes some unnecessary type conversions --- deps/ox/src/ox/mc/intops.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deps/ox/src/ox/mc/intops.hpp b/deps/ox/src/ox/mc/intops.hpp index d85ef116..57fd9567 100644 --- a/deps/ox/src/ox/mc/intops.hpp +++ b/deps/ox/src/ox/mc/intops.hpp @@ -24,14 +24,14 @@ static constexpr auto Bits = sizeof(T) << 3; */ template [[nodiscard]] constexpr std::size_t highestBit(I val) noexcept { - auto shiftStart = sizeof(I) * 8 - 1; + int shiftStart = sizeof(I) * 8 - 1; // find most significant non-sign indicator bit std::size_t highestBit = 0; // start at one bit lower if signed if constexpr(ox::is_signed_v) { --shiftStart; } - for (int i = shiftStart; i > -1; --i) { + for (auto i = shiftStart; i > -1; --i) { const auto bitValue = (val >> i) & 1; if (bitValue) { highestBit = i;