File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ ipv4_address::ipv4_address(const std::string& addr) {
46
46
throw std::runtime_error (
47
47
fmt::format (" Wrong format for IPv4 address {}. Please ensure it's in dotted-decimal format" , addr));
48
48
}
49
- ip = static_cast <uint32_t >(std::move (ipv4).to_ulong ());
49
+ ip = static_cast <uint32_t >(std::move (ipv4).to_uint ());
50
50
}
51
51
52
52
ipv4::ipv4 (interface* netif)
Original file line number Diff line number Diff line change @@ -57,17 +57,17 @@ ipv4_addr::ipv4_addr(const std::string &addr) {
57
57
std::vector<std::string> items;
58
58
boost::split (items, addr, boost::is_any_of (" :" ));
59
59
if (items.size () == 1 ) {
60
- ip = boost::asio::ip::make_address_v4 (addr).to_ulong ();
60
+ ip = boost::asio::ip::make_address_v4 (addr).to_uint ();
61
61
port = 0 ;
62
62
} else if (items.size () == 2 ) {
63
- ip = boost::asio::ip::make_address_v4 (items[0 ]).to_ulong ();
63
+ ip = boost::asio::ip::make_address_v4 (items[0 ]).to_uint ();
64
64
port = std::stoul (items[1 ]);
65
65
} else {
66
66
throw std::invalid_argument (" invalid format: " + addr);
67
67
}
68
68
}
69
69
70
- ipv4_addr::ipv4_addr (const std::string &addr, uint16_t port_) : ip(boost::asio::ip::make_address_v4(addr).to_ulong ()), port(port_) {}
70
+ ipv4_addr::ipv4_addr (const std::string &addr, uint16_t port_) : ip(boost::asio::ip::make_address_v4(addr).to_uint ()), port(port_) {}
71
71
72
72
ipv4_addr::ipv4_addr (const net::inet_address& a, uint16_t port)
73
73
: ipv4_addr(::in_addr(a), port)
You can’t perform that action at this time.
0 commit comments