diff --git a/include/alpaca/detail/variable_length_encoding.h b/include/alpaca/detail/variable_length_encoding.h index b12f147..13638d4 100644 --- a/include/alpaca/detail/variable_length_encoding.h +++ b/include/alpaca/detail/variable_length_encoding.h @@ -9,15 +9,15 @@ namespace alpaca { namespace detail { template bool CHECK_BIT(T &value, uint8_t pos) { - return ((value) & (1 << (pos))); + return ((value) & (T{1} << (pos))); } template void SET_BIT(T &value, uint8_t pos) { - value = value | 1 << pos; + value = value | T{1} << pos; } template void RESET_BIT(T &value, uint8_t pos) { - value = value & ~(1 << pos); + value = value & ~(T{1} << pos); } template @@ -242,4 +242,4 @@ decode_varint(Container &input, std::size_t ¤t_index) { } // namespace detail -} // namespace alpaca \ No newline at end of file +} // namespace alpaca