diff --git a/include/dwarfs/writer/internal/cyclic_hash.h b/include/dwarfs/writer/internal/cyclic_hash.h index 23573818..9ab16e92 100644 --- a/include/dwarfs/writer/internal/cyclic_hash.h +++ b/include/dwarfs/writer/internal/cyclic_hash.h @@ -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(byte); - uint16_t a{static_cast(v * length)}; - uint16_t b{static_cast(v * (length * (length + 1)) / 2)}; + auto v = static_cast(byte); + auto a = static_cast(v * length); + auto b = static_cast(v * (length * (length + 1)) / 2); return static_cast(a) | (static_cast(b) << 16); }