diff --git a/Chaos/Service/Branchless.hpp b/Chaos/Service/Branchless.hpp index 5e8336f..3c3dff4 100644 --- a/Chaos/Service/Branchless.hpp +++ b/Chaos/Service/Branchless.hpp @@ -11,7 +11,7 @@ namespace Chaos::Service struct Branchless { template - static constexpr OutUInt Msb(InUInt in) noexcept + static constexpr OutUInt MsbMask(InUInt in) noexcept { static_assert(std::is_unsigned_v && std::is_unsigned_v); @@ -30,7 +30,7 @@ struct Branchless const uint64_t lhsEx = lhs; const uint64_t rhsEx = rhs; - return Msb(lhsEx ^ ((lhsEx ^ rhsEx) | ((lhsEx - rhsEx) ^ lhsEx))); + return MsbMask(lhsEx ^ ((lhsEx ^ rhsEx) | ((lhsEx - rhsEx) ^ lhsEx))); } template @@ -42,7 +42,7 @@ struct Branchless const uint64_t inEx = in; - return Msb(~inEx & (inEx - 1U)); + return MsbMask(~inEx & (inEx - 1U)); } template