Commit 083510f0 authored by Junekey Jeon's avatar Junekey Jeon Committed by Victor Zverovich

Add FMT_CONSTEXPR to rotr instead

parent dba99bc8
......@@ -818,11 +818,11 @@ struct uint128_wrapper {
};
// Compilers should be able to optimize this into the ror instruction.
inline uint32_t rotr(uint32_t n, uint32_t r) noexcept {
FMT_CONSTEXPR inline uint32_t rotr(uint32_t n, uint32_t r) noexcept {
r &= 31;
return (n >> r) | (n << (32 - r));
}
inline uint64_t rotr(uint64_t n, uint32_t r) noexcept {
FMT_CONSTEXPR inline uint64_t rotr(uint64_t n, uint32_t r) noexcept {
r &= 63;
return (n >> r) | (n << (64 - r));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment