summaryrefslogtreecommitdiff
path: root/boost/asio/ip/detail/impl/endpoint.ipp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/asio/ip/detail/impl/endpoint.ipp')
-rw-r--r--boost/asio/ip/detail/impl/endpoint.ipp13
1 files changed, 4 insertions, 9 deletions
diff --git a/boost/asio/ip/detail/impl/endpoint.ipp b/boost/asio/ip/detail/impl/endpoint.ipp
index f1f9309af5..9908479327 100644
--- a/boost/asio/ip/detail/impl/endpoint.ipp
+++ b/boost/asio/ip/detail/impl/endpoint.ipp
@@ -81,8 +81,7 @@ endpoint::endpoint(const boost::asio::ip::address& addr,
boost::asio::detail::socket_ops::host_to_network_short(port_num);
data_.v4.sin_addr.s_addr =
boost::asio::detail::socket_ops::host_to_network_long(
- static_cast<boost::asio::detail::u_long_type>(
- addr.to_v4().to_ulong()));
+ addr.to_v4().to_uint());
}
else
{
@@ -178,18 +177,14 @@ bool operator<(const endpoint& e1, const endpoint& e2)
}
#if !defined(BOOST_ASIO_NO_IOSTREAM)
-std::string endpoint::to_string(boost::system::error_code& ec) const
+std::string endpoint::to_string() const
{
- std::string a = address().to_string(ec);
- if (ec)
- return std::string();
-
std::ostringstream tmp_os;
tmp_os.imbue(std::locale::classic());
if (is_v4())
- tmp_os << a;
+ tmp_os << address();
else
- tmp_os << '[' << a << ']';
+ tmp_os << '[' << address() << ']';
tmp_os << ':' << port();
return tmp_os.str();