diff options
author | Remko Tronçon <git@el-tramo.be> | 2012-12-23 13:16:26 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2012-12-23 14:43:26 (GMT) |
commit | 491ddd570a752cf9bda85933bed0c6942e39b1f9 (patch) | |
tree | 10c25c1be8cc08d0497df1dccd56a10fbb30beee /3rdParty/Boost/src/boost/asio/local/detail/impl | |
parent | da7d7a0ca71b80281aa9ff2526290b61ccb0cc60 (diff) | |
download | swift-491ddd570a752cf9bda85933bed0c6942e39b1f9.zip swift-491ddd570a752cf9bda85933bed0c6942e39b1f9.tar.bz2 |
Update Boost to 1.52.0.
Change-Id: I1e56bea2600bf2ed9c5b3aba8c4f9d2a0f350e77
Diffstat (limited to '3rdParty/Boost/src/boost/asio/local/detail/impl')
-rw-r--r-- | 3rdParty/Boost/src/boost/asio/local/detail/impl/endpoint.ipp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/3rdParty/Boost/src/boost/asio/local/detail/impl/endpoint.ipp b/3rdParty/Boost/src/boost/asio/local/detail/impl/endpoint.ipp index a4c1e56..8e3d06a 100644 --- a/3rdParty/Boost/src/boost/asio/local/detail/impl/endpoint.ipp +++ b/3rdParty/Boost/src/boost/asio/local/detail/impl/endpoint.ipp @@ -2,7 +2,7 @@ // local/detail/impl/endpoint.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2011 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Derived from a public domain implementation written by Daniel Casimiro. // // Distributed under the Boost Software License, Version 1.0. (See accompanying @@ -38,31 +38,31 @@ endpoint::endpoint() init("", 0); } -endpoint::endpoint(const char* path) +endpoint::endpoint(const char* path_name) { using namespace std; // For strlen. - init(path, strlen(path)); + init(path_name, strlen(path_name)); } -endpoint::endpoint(const std::string& path) +endpoint::endpoint(const std::string& path_name) { - init(path.data(), path.length()); + init(path_name.data(), path_name.length()); } -void endpoint::resize(std::size_t size) +void endpoint::resize(std::size_t new_size) { - if (size > sizeof(boost::asio::detail::sockaddr_un_type)) + if (new_size > sizeof(boost::asio::detail::sockaddr_un_type)) { boost::system::error_code ec(boost::asio::error::invalid_argument); boost::asio::detail::throw_error(ec); } - else if (size == 0) + else if (new_size == 0) { path_length_ = 0; } else { - path_length_ = size + path_length_ = new_size - offsetof(boost::asio::detail::sockaddr_un_type, sun_path); // The path returned by the operating system may be NUL-terminated. @@ -97,7 +97,7 @@ bool operator<(const endpoint& e1, const endpoint& e2) return e1.path() < e2.path(); } -void endpoint::init(const char* path, std::size_t path_length) +void endpoint::init(const char* path_name, std::size_t path_length) { if (path_length > sizeof(data_.local.sun_path) - 1) { @@ -109,7 +109,7 @@ void endpoint::init(const char* path, std::size_t path_length) using namespace std; // For memcpy. data_.local = boost::asio::detail::sockaddr_un_type(); data_.local.sun_family = AF_UNIX; - memcpy(data_.local.sun_path, path, path_length); + memcpy(data_.local.sun_path, path_name, path_length); path_length_ = path_length; // NUL-terminate normal path names. Names that start with a NUL are in the |