Skip to content

Commit

Permalink
fix sign conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
arvidn committed Jan 10, 2022
1 parent f545a68 commit fc4d3b0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/libtorrent/socket.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ struct udp : boost::asio::ip::udp {
#ifdef IPV6_TCLASS
struct traffic_class
{
explicit traffic_class(char val): m_value(val) {}
explicit traffic_class(int val): m_value(val) {}
template<class Protocol>
int level(Protocol const&) const { return IPPROTO_IPV6; }
template<class Protocol>
Expand All @@ -178,7 +178,7 @@ struct udp : boost::asio::ip::udp {
#else
using tos_t = int;
#endif
explicit type_of_service(char val) : m_value(tos_t(val)) {}
explicit type_of_service(tos_t const val) : m_value(tos_t(val)) {}
template<class Protocol>
int level(Protocol const&) const { return IPPROTO_IP; }
template<class Protocol>
Expand All @@ -193,7 +193,7 @@ struct udp : boost::asio::ip::udp {
#ifdef IP_DSCP_TRAFFIC_TYPE
struct dscp_traffic_type
{
explicit dscp_traffic_type(char val) : m_value(DWORD(val)) {}
explicit dscp_traffic_type(DWORD val) : m_value(val) {}
template<class Protocol>
int level(Protocol const&) const { return IP_DSCP_TRAFFIC_TYPE; }
template<class Protocol>
Expand Down

0 comments on commit fc4d3b0

Please sign in to comment.