core+face: avoid deprecated Boost.Asio interfaces
Change-Id: I07ec286531edf63f258babe1561b4da2a88edd10
diff --git a/core/network.cpp b/core/network.cpp
index 08a1197..bc0db72 100644
--- a/core/network.cpp
+++ b/core/network.cpp
@@ -48,7 +48,7 @@
Network::getMaxRangeV4()
{
using boost::asio::ip::address_v4;
- static Network range{address_v4{}, address_v4{0xffffffff}};
+ static const Network range{address_v4{}, address_v4{0xffffffff}};
return range;
}
@@ -56,9 +56,9 @@
Network::getMaxRangeV6()
{
using boost::asio::ip::address_v6;
- static address_v6::bytes_type maxV6 = {{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}};
- static Network range{address_v6{}, address_v6{maxV6}};
+ static const address_v6::bytes_type maxV6 = {{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}};
+ static const Network range{address_v6{}, address_v6{maxV6}};
return range;
}
@@ -96,8 +96,8 @@
size_t position = networkStr.find('/');
if (position == std::string::npos) {
try {
- network.m_minAddress = ip::address::from_string(networkStr);
- network.m_maxAddress = ip::address::from_string(networkStr);
+ network.m_minAddress = ip::make_address(networkStr);
+ network.m_maxAddress = ip::make_address(networkStr);
}
catch (const boost::system::system_error&) {
is.setstate(std::ios::failbit);
@@ -106,7 +106,7 @@
}
else {
boost::system::error_code ec;
- auto address = ip::address::from_string(networkStr.substr(0, position), ec);
+ auto address = ip::make_address(networkStr.substr(0, position), ec);
if (ec) {
is.setstate(std::ios::failbit);
return is;