Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite9bf5f7

Browse files
committed
Nicer formatting
1 parentc4d758a commite9bf5f7

File tree

4 files changed

+24
-18
lines changed

4 files changed

+24
-18
lines changed

‎boost/network/protocol/http/client/async_impl.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,16 @@ struct async_client
3838
typedef std::function<bool(string_type&)> body_generator_function_type;
3939

4040
async_client(bool cache_resolved,bool follow_redirect,
41-
bool always_verify_peer,int timeout,
42-
bool remove_chunk_markers,
41+
bool always_verify_peer,int timeout,bool remove_chunk_markers,
4342
std::shared_ptr<boost::asio::io_service> service,
4443
optional<string_type> certificate_filename,
4544
optional<string_type> verify_path,
4645
optional<string_type> certificate_file,
4746
optional<string_type> private_key_file,
4847
optional<string_type> ciphers,
4948
optional<string_type> sni_hostname,long ssl_options)
50-
: connection_base(cache_resolved, follow_redirect, timeout, remove_chunk_markers),
49+
: connection_base(cache_resolved, follow_redirect, timeout,
50+
remove_chunk_markers),
5151
service_ptr(service.get() ? service
5252
: std::make_shared<boost::asio::io_service>()),
5353
service_(*service_ptr),

‎boost/network/protocol/http/client/connection/async_base.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ struct async_connection_base {
4343
// tag.
4444
static connection_ptrnew_connection(
4545
resolve_function resolve, resolver_type &resolver,bool follow_redirect,
46-
bool always_verify_peer,bool https,int timeout,bool remove_chunk_markers,
46+
bool always_verify_peer,bool https,int timeout,
47+
bool remove_chunk_markers,
4748
optional<string_type> certificate_filename = optional<string_type>(),
4849
optional<string_type>const &verify_path = optional<string_type>(),
4950
optional<string_type> certificate_file = optional<string_type>(),
@@ -59,7 +60,8 @@ struct async_connection_base {
5960
certificate_filename, verify_path, certificate_file, private_key_file,
6061
ciphers, sni_hostname, ssl_options);
6162
auto temp = std::make_shared<async_connection>(
62-
resolver, resolve, follow_redirect, timeout, remove_chunk_markers,std::move(delegate));
63+
resolver, resolve, follow_redirect, timeout, remove_chunk_markers,
64+
std::move(delegate));
6365
BOOST_ASSERT(temp !=nullptr);
6466
return temp;
6567
}

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

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ namespace impl {
4040

4141
template<classTag>
4242
structchunk_encoding_parser {
43-
4443
chunk_encoding_parser() : state(state_t::header), chunk_size(0) {}
4544

4645
enumstate_t { header, header_end, data, data_end };
@@ -49,23 +48,27 @@ struct chunk_encoding_parser {
4948
size_t chunk_size;
5049
std::array<typename char_<Tag>::type,1024> buffer;
5150

52-
voidupdate_chunk_size(boost::iterator_range<typename std::array<typename char_<Tag>::type,1024>::const_iterator>const& range) {
53-
if (range.empty())
54-
return;
51+
voidupdate_chunk_size(boost::iterator_range<typename std::array<
52+
typename char_<Tag>::type,1024>::const_iterator>const &range) {
53+
if (range.empty())
54+
return;
5555
std::stringstream ss;
5656
ss << std::hex << range;
5757
size_t size;
5858
ss >> size;
59-
chunk_size = (chunk_size << (range.size()*4)) + size;
59+
chunk_size = (chunk_size << (range.size() *4)) + size;
6060
}
6161

62-
boost::iterator_range<typename std::array<typename char_<Tag>::type,1024>::const_iterator>operator()(boost::iterator_range<typename std::array<typename char_<Tag>::type,1024>::const_iterator>const& range) {
62+
boost::iterator_range<
63+
typename std::array<typename char_<Tag>::type,1024>::const_iterator>
64+
operator()(boost::iterator_range<typename std::array<
65+
typename char_<Tag>::type,1024>::const_iterator>const &range) {
6366
auto iter =boost::begin(range);
6467
auto begin = iter;
6568
auto pos =boost::begin(buffer);
6669

67-
while (iter !=boost::end(range))
68-
switch(state) {
70+
while (iter !=boost::end(range))
71+
switch(state) {
6972
casestate_t::header:
7073
iter =std::find(iter,boost::end(range),'\r');
7174
update_chunk_size(boost::make_iterator_range(begin, iter));
@@ -87,7 +90,8 @@ struct chunk_encoding_parser {
8790
++iter;
8891
state =state_t::data_end;
8992
}else {
90-
auto len =std::min(chunk_size, (size_t)std::distance(iter,boost::end(range)));
93+
auto len =std::min(chunk_size,
94+
(size_t)std::distance(iter,boost::end(range)));
9195
begin = iter;
9296
iter =std::next(iter, len);
9397
pos =std::copy(begin, iter, pos);
@@ -96,7 +100,7 @@ struct chunk_encoding_parser {
96100
break;
97101

98102
casestate_t::data_end:
99-
BOOST_ASSERT(*iter =='\n');
103+
BOOST_ASSERT(*iter =='\n');
100104
++iter;
101105
begin = iter;
102106
state =state_t::header;

‎boost/network/protocol/http/policies/async_connection.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ struct async_connection_policy : resolver_policy<Tag>::type {
8585
std::uint16_t port, resolve_completion_function once_resolved) {
8686
this->resolve(resolver, host, port, once_resolved);
8787
},
88-
resolver,boost::iequals(protocol_,string_type("https")), timeout_, remove_chunk_markers_,
89-
certificate_filename, verify_path, certificate_file, private_key_file,
90-
ciphers, sni_hostname, ssl_options);
88+
resolver,boost::iequals(protocol_,string_type("https")), timeout_,
89+
remove_chunk_markers_, certificate_filename, verify_path,
90+
certificate_file, private_key_file,ciphers, sni_hostname, ssl_options);
9191
}
9292

9393
voidcleanup() {}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp