Skip to content

Commit 873929e

Browse files
committed
Replaced boost/cstdint.hpp with cstdint.
1 parent 1e9ede7 commit 873929e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+131
-111
lines changed

boost/network/protocol/http/algorithms/linearize.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
#include <algorithm>
1212
#include <bitset>
13+
#include <cstdint>
1314
#include <boost/algorithm/string/compare.hpp>
1415
#include <boost/concept/requires.hpp>
1516
#include <boost/lexical_cast.hpp>
@@ -137,7 +138,7 @@ OutputIterator linearize(Request const& request,
137138
*oi = consts::colon_char();
138139
*oi = consts::space_char();
139140
boost::copy(request.host(), oi);
140-
boost::optional<boost::uint16_t> port_ =
141+
boost::optional<std::uint16_t> port_ =
141142
#if (_MSC_VER >= 1600 && BOOST_VERSION > 105500)
142143
port(request).as_optional();
143144
#else

boost/network/protocol/http/client/connection/async_normal.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
// http://www.boost.org/LICENSE_1_0.txt)
1111

1212
#include <iterator>
13+
#include <cstdint>
1314
#include <boost/algorithm/string/trim.hpp>
1415
#include <boost/array.hpp>
1516
#include <boost/asio/deadline_timer.hpp>
@@ -18,7 +19,6 @@
1819
#include <boost/asio/streambuf.hpp>
1920
#include <boost/assert.hpp>
2021
#include <boost/bind/protect.hpp>
21-
#include <boost/cstdint.hpp>
2222
#include <boost/logic/tribool.hpp>
2323
#include <boost/network/constants.hpp>
2424
#include <boost/network/detail/debug.hpp>
@@ -98,9 +98,9 @@ struct http_async_connection
9898
std::ostreambuf_iterator<typename char_<Tag>::type>(
9999
&command_streambuf));
100100
this->method = method;
101-
boost::uint16_t port_ = port(request);
101+
std::uint16_t port_ = port(request);
102102
string_type host_ = host(request);
103-
boost::uint16_t source_port = request.source_port();
103+
std::uint16_t source_port = request.source_port();
104104

105105
resolve_(resolver_, host_, port_,
106106
request_strand_.wrap(boost::bind(
@@ -134,8 +134,8 @@ struct http_async_connection
134134
is_timedout_ = true;
135135
}
136136

137-
void handle_resolved(string_type host, boost::uint16_t port,
138-
boost::uint16_t source_port, bool get_body,
137+
void handle_resolved(string_type host, std::uint16_t port,
138+
std::uint16_t source_port, bool get_body,
139139
body_callback_function_type callback,
140140
body_generator_function_type generator,
141141
boost::system::error_code const& ec,
@@ -159,8 +159,8 @@ struct http_async_connection
159159
}
160160
}
161161

162-
void handle_connected(string_type host, boost::uint16_t port,
163-
boost::uint16_t source_port, bool get_body,
162+
void handle_connected(string_type host, std::uint16_t port,
163+
std::uint16_t source_port, bool get_body,
164164
body_callback_function_type callback,
165165
body_generator_function_type generator,
166166
resolver_iterator_pair endpoint_range,

boost/network/protocol/http/client/connection/async_protocol_handler.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// http://www.boost.org/LICENSE_1_0.txt)
1010

1111
#include <iterator>
12+
#include <cstdint>
1213
#include <boost/fusion/tuple/tuple.hpp>
1314
#include <boost/fusion/tuple/tuple_tie.hpp>
1415
#include <boost/logic/tribool.hpp>
@@ -76,7 +77,7 @@ struct http_async_protocol_handler {
7677
version_promise.get_future());
7778
version(response_, version_future);
7879

79-
std::shared_future<boost::uint16_t> status_future(
80+
std::shared_future<std::uint16_t> status_future(
8081
status_promise.get_future());
8182
status(response_, status_future);
8283

@@ -161,7 +162,7 @@ struct http_async_protocol_handler {
161162
std::swap(status, partial_parsed);
162163
status.append(std::begin(result_range), std::end(result_range));
163164
trim(status);
164-
boost::uint16_t status_int = lexical_cast<boost::uint16_t>(status);
165+
std::uint16_t status_int = lexical_cast<std::uint16_t>(status);
165166
status_promise.set_value(status_int);
166167
part_begin = std::end(result_range);
167168
} else if (parsed_ok == false) {
@@ -340,7 +341,7 @@ struct http_async_protocol_handler {
340341

341342
response_parser_type response_parser_;
342343
std::promise<string_type> version_promise;
343-
std::promise<boost::uint16_t> status_promise;
344+
std::promise<std::uint16_t> status_promise;
344345
std::promise<string_type> status_message_promise;
345346
std::promise<typename headers_container<Tag>::type> headers_promise;
346347
std::promise<string_type> source_promise;

boost/network/protocol/http/client/connection/connection_delegate.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
// (See accompanying file LICENSE_1_0.txt or copy at
88
// http://www.boost.org/LICENSE_1_0.txt)
99

10+
#include <cstdint>
1011
#include <boost/asio/ip/tcp.hpp>
1112
#include <boost/asio/streambuf.hpp>
1213
#include <boost/function.hpp>
@@ -18,7 +19,7 @@ namespace impl {
1819

1920
struct connection_delegate {
2021
virtual void connect(asio::ip::tcp::endpoint &endpoint, std::string host,
21-
boost::uint16_t source_port,
22+
std::uint16_t source_port,
2223
function<void(system::error_code const &)> handler) = 0;
2324
virtual void write(
2425
asio::streambuf &command_streambuf,

boost/network/protocol/http/client/connection/normal_delegate.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@
77
// (See accompanying file LICENSE_1_0.txt or copy at
88
// http://www.boost.org/LICENSE_1_0.txt)
99

10+
#include <memory>
11+
#include <cstdint>
1012
#include <boost/asio/ip/tcp.hpp>
1113
#include <boost/asio/placeholders.hpp>
1214
#include <boost/asio/streambuf.hpp>
1315
#include <boost/network/protocol/http/client/connection/connection_delegate.hpp>
1416
#include <boost/function.hpp>
15-
#include <memory>
1617

1718
namespace boost {
1819
namespace network {
@@ -23,7 +24,7 @@ struct normal_delegate : connection_delegate {
2324
explicit normal_delegate(asio::io_service &service);
2425

2526
void connect(asio::ip::tcp::endpoint &endpoint, std::string host,
26-
boost::uint16_t source_port,
27+
std::uint16_t source_port,
2728
function<void(system::error_code const &)> handler) override;
2829
void write(asio::streambuf &command_streambuf,
2930
function<void(system::error_code const &, size_t)> handler)

boost/network/protocol/http/client/connection/normal_delegate.ipp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
// (See accompanying file LICENSE_1_0.txt or copy at
88
// http://www.boost.org/LICENSE_1_0.txt)
99

10+
#include <cstdint>
1011
#include <boost/asio/ip/tcp.hpp>
1112
#include <boost/asio/streambuf.hpp>
1213
#include <boost/asio/write.hpp>
@@ -20,7 +21,7 @@ boost::network::http::impl::normal_delegate::normal_delegate(
2021

2122
void boost::network::http::impl::normal_delegate::connect(
2223
asio::ip::tcp::endpoint &endpoint, std::string host,
23-
boost::uint16_t source_port,
24+
std::uint16_t source_port,
2425
function<void(system::error_code const &)> handler) {
2526

2627
// TODO(dberris): review parameter necessity.

boost/network/protocol/http/client/connection/ssl_delegate.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@
77
// (See accompanying file LICENSE_1_0.txt or copy at
88
// http://www.boost.org/LICENSE_1_0.txt)
99

10+
#include <memory>
11+
#include <cstdint>
1012
#include <boost/asio/io_service.hpp>
1113
#include <boost/asio/ssl.hpp>
1214
#include <boost/network/protocol/http/client/connection/connection_delegate.hpp>
1315
#include <boost/network/support/is_default_string.hpp>
1416
#include <boost/network/support/is_default_wstring.hpp>
1517
#include <boost/optional.hpp>
16-
#include <memory>
1718

1819
namespace boost {
1920
namespace network {
@@ -30,7 +31,7 @@ struct ssl_delegate : connection_delegate,
3031
optional<std::string> ciphers, long ssl_options);
3132

3233
void connect(asio::ip::tcp::endpoint &endpoint, std::string host,
33-
boost::uint16_t source_port,
34+
std::uint16_t source_port,
3435
function<void(system::error_code const &)> handler) override;
3536
void write(asio::streambuf &command_streambuf,
3637
function<void(system::error_code const &, size_t)> handler)

boost/network/protocol/http/client/connection/ssl_delegate.ipp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
// (See accompanying file LICENSE_1_0.txt or copy at
88
// http://www.boost.org/LICENSE_1_0.txt)
99

10+
#include <cstdint>
1011
#include <boost/asio/ssl.hpp>
1112
#include <boost/bind.hpp>
1213
#include <boost/network/protocol/http/client/connection/ssl_delegate.hpp>
@@ -28,7 +29,7 @@ boost::network::http::impl::ssl_delegate::ssl_delegate(
2829

2930
void boost::network::http::impl::ssl_delegate::connect(
3031
asio::ip::tcp::endpoint &endpoint, std::string host,
31-
boost::uint16_t source_port,
32+
std::uint16_t source_port,
3233
function<void(system::error_code const &)> handler) {
3334
context_.reset(
3435
new asio::ssl::context(asio::ssl::context::method::sslv23_client));

boost/network/protocol/http/impl/request.hpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
* object encapsulates a URI which is parsed at runtime.
1717
*/
1818

19+
#include <cstdint>
1920
#include <boost/algorithm/string.hpp>
20-
#include <boost/cstdint.hpp>
2121
#include <boost/fusion/container/map.hpp>
2222
#include <boost/fusion/sequence/intrinsic/at_key.hpp>
2323
#include <boost/fusion/sequence/intrinsic/value_at_key.hpp>
@@ -51,13 +51,13 @@ namespace http {
5151
template <class Tag>
5252
struct basic_request : public basic_message<Tag> {
5353
mutable boost::network::uri::uri uri_;
54-
boost::uint16_t source_port_;
54+
std::uint16_t source_port_;
5555
typedef basic_message<Tag> base_type;
5656

5757
public:
5858
typedef Tag tag;
5959
typedef typename string<tag>::type string_type;
60-
typedef boost::uint16_t port_type;
60+
typedef std::uint16_t port_type;
6161

6262
explicit basic_request(string_type const& uri_)
6363
: uri_(uri_), source_port_(0) {}
@@ -111,9 +111,9 @@ struct basic_request : public basic_message<Tag> {
111111

112112
boost::network::uri::uri const& uri() const { return uri_; }
113113

114-
void source_port(const boost::uint16_t port) { source_port_ = port; }
114+
void source_port(const std::uint16_t port) { source_port_ = port; }
115115

116-
boost::uint16_t source_port() const { return source_port_; }
116+
std::uint16_t source_port() const { return source_port_; }
117117
};
118118

119119
/** This is the implementation of a POD request type
@@ -133,13 +133,13 @@ struct not_quite_pod_request_base {
133133
typedef typename request_header<Tag>::type header_type;
134134
typedef typename vector<Tag>::template apply<header_type>::type vector_type;
135135
typedef vector_type headers_container_type;
136-
typedef boost::uint16_t port_type;
136+
typedef std::uint16_t port_type;
137137
mutable string_type source;
138138
mutable port_type source_port;
139139
mutable string_type method;
140140
mutable string_type destination;
141-
mutable boost::uint8_t http_version_major;
142-
mutable boost::uint8_t http_version_minor;
141+
mutable std::uint8_t http_version_major;
142+
mutable std::uint8_t http_version_minor;
143143
mutable vector_type headers;
144144
mutable string_type body;
145145

boost/network/protocol/http/message.hpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@
1313
#ifndef BOOST_NETWORK_PROTOCOL_HTTP_MESSAGE_HPP
1414
#define BOOST_NETWORK_PROTOCOL_HTTP_MESSAGE_HPP
1515

16+
#include <string>
17+
#include <cstdint>
1618
#include <boost/network/protocol/http/traits.hpp>
1719
#include <boost/network/protocol/http/message/header/name.hpp>
1820
#include <boost/network/protocol/http/message/header/value.hpp>
1921
#include <boost/network/message.hpp>
2022
#include <boost/network/tags.hpp>
21-
#include <string>
2223

2324
namespace boost {
2425
namespace network {
@@ -75,7 +76,7 @@ struct message_impl : public basic_message<Tag> {
7576

7677
protected:
7778
mutable string_type version_;
78-
mutable boost::uint16_t status_;
79+
mutable std::uint16_t status_;
7980
mutable string_type status_message_;
8081

8182
private:
@@ -94,9 +95,9 @@ struct message_impl : public basic_message<Tag> {
9495

9596
string_type const version() const { return version_; }
9697

97-
void status(boost::uint16_t status) const { status_ = status; }
98+
void status(std::uint16_t status) const { status_ = status; }
9899

99-
boost::uint16_t status() const { return status_; }
100+
std::uint16_t status() const { return status_; }
100101

101102
void status_message(string_type const &status_message) const {
102103
status_message_ = status_message;

0 commit comments

Comments
 (0)