mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-09 04:19:10 -04:00
refactor(cyclic_hash): use auto
for static_cast
result
This commit is contained in:
parent
95dc0fea3b
commit
fa3438a40a
@ -56,9 +56,9 @@ class rsync_hash {
|
||||
|
||||
static DWARFS_FORCE_INLINE constexpr uint32_t
|
||||
repeating_window(uint8_t byte, size_t length) {
|
||||
uint16_t v = static_cast<uint16_t>(byte);
|
||||
uint16_t a{static_cast<uint16_t>(v * length)};
|
||||
uint16_t b{static_cast<uint16_t>(v * (length * (length + 1)) / 2)};
|
||||
auto v = static_cast<uint16_t>(byte);
|
||||
auto a = static_cast<uint16_t>(v * length);
|
||||
auto b = static_cast<uint16_t>(v * (length * (length + 1)) / 2);
|
||||
return static_cast<uint32_t>(a) | (static_cast<uint32_t>(b) << 16);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user