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

Commit6349c11

Browse files
committed
clang-tidy modernize-.* all the things
1 parent7b88a41 commit6349c11

27 files changed

+89
-90
lines changed

‎boost/network/message/directives/remove_header.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ template <class T>
2121
structremove_header_directive {
2222

2323
explicitremove_header_directive(T header_name)
24-
: header_name_(header_name) {};
24+
: header_name_(std::move(header_name)) {};
2525

2626
template<classMessageTag>
2727
voidoperator()(basic_message<MessageTag>& msg)const {

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,23 +40,23 @@ struct async_client
4040
async_client(bool cache_resolved,bool follow_redirect,
4141
bool always_verify_peer,int timeout,
4242
boost::shared_ptr<boost::asio::io_service> service,
43-
optional<string_type>const& certificate_filename,
44-
optional<string_type>const& verify_path,
45-
optional<string_type>const& certificate_file,
46-
optional<string_type>const& private_key_file,
47-
optional<string_type>const& ciphers,long ssl_options)
43+
optional<string_type> certificate_filename,
44+
optional<string_type> verify_path,
45+
optional<string_type> certificate_file,
46+
optional<string_type> private_key_file,
47+
optional<string_type> ciphers,long ssl_options)
4848
: connection_base(cache_resolved, follow_redirect, timeout),
4949
service_ptr(service.get()
5050
? service
5151
: boost::make_shared<boost::asio::io_service>()),
5252
service_(*service_ptr),
5353
resolver_(service_),
5454
sentinel_(new boost::asio::io_service::work(service_)),
55-
certificate_filename_(certificate_filename),
56-
verify_path_(verify_path),
57-
certificate_file_(certificate_file),
58-
private_key_file_(private_key_file),
59-
ciphers_(ciphers),
55+
certificate_filename_(std::move(certificate_filename)),
56+
verify_path_(std::move(verify_path)),
57+
certificate_file_(std::move(certificate_file)),
58+
private_key_file_(std::move(private_key_file)),
59+
ciphers_(std::move(ciphers)),
6060
ssl_options_(ssl_options),
6161
always_verify_peer_(always_verify_peer) {
6262
connection_base::resolver_strand_.reset(

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ struct http_async_connection
7878
is_timedout_(false),
7979
follow_redirect_(follow_redirect),
8080
resolver_(resolver),
81-
resolve_(resolve),
81+
resolve_(std::move(resolve)),
8282
request_strand_(resolver.get_io_service()),
83-
delegate_(delegate) {}
83+
delegate_(std::move(delegate)) {}
8484

8585
// This is the main entry point for the connection/request pipeline.
8686
// We're

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

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,28 +22,29 @@ namespace impl {
2222
structnormal_delegate : connection_delegate {
2323
explicitnormal_delegate(asio::io_service &service);
2424

25-
voidconnect(asio::ip::tcp::endpoint &endpoint, std::string host, boost::uint16_t source_port,
26-
function<void(system::error_codeconst &)> handler)override;
27-
voidwrite(
28-
asio::streambuf &command_streambuf,
29-
function<void(system::error_codeconst &,size_t)> handler)override;
30-
voidread_some(
31-
asio::mutable_buffers_1const &read_buffer,
32-
function<void(system::error_codeconst &,size_t)> handler)override;
25+
voidconnect(asio::ip::tcp::endpoint &endpoint, std::string host,
26+
boost::uint16_t source_port,
27+
function<void(system::error_codeconst &)> handler)override;
28+
voidwrite(asio::streambuf &command_streambuf,
29+
function<void(system::error_codeconst &,size_t)> handler)
30+
override;
31+
voidread_some(asio::mutable_buffers_1const &read_buffer,
32+
function<void(system::error_codeconst &,size_t)> handler)
33+
override;
3334
voiddisconnect()override;
34-
~normal_delegate()override;
35+
~normal_delegate()override =default;
36+
37+
normal_delegate(normal_delegateconst &) =delete;
38+
normal_delegate &operator=(normal_delegate) =delete;
3539

3640
private:
3741
asio::io_service &service_;
3842
std::unique_ptr<asio::ip::tcp::socket> socket_;
39-
40-
normal_delegate(normal_delegateconst &);// = delete
41-
normal_delegate &operator=(normal_delegate);// = delete
4243
};
4344

44-
}// namespace impl
45-
}// namespace http
45+
}// namespace impl
46+
}// namespace http
4647
}// namespace network
47-
}// namespace boost
48+
}// namespace boost
4849

49-
#endif// BOOST_NETWORK_PROTOCOL_HTTP_CLIENT_CONNECTION_NORMAL_DELEGATE_20110819
50+
#endif// BOOST_NETWORK_PROTOCOL_HTTP_CLIENT_CONNECTION_NORMAL_DELEGATE_20110819

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,4 @@ void boost::network::http::impl::normal_delegate::disconnect() {
5454
}
5555
}
5656

57-
boost::network::http::impl::normal_delegate::~normal_delegate() {}
58-
5957
#endif// BOOST_NETWORK_PROTOCOL_HTTP_CLIENT_CONNECTION_NORMAL_DELEGATE_IPP_20110819

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ boost::network::http::impl::ssl_delegate::ssl_delegate(
2020
optional<std::string> ciphers,
2121
long ssl_options)
2222
: service_(service),
23-
certificate_filename_(certificate_filename),
24-
verify_path_(verify_path),
25-
certificate_file_(certificate_file),
26-
private_key_file_(private_key_file),
27-
ciphers_(ciphers),
23+
certificate_filename_(std::move(certificate_filename)),
24+
verify_path_(std::move(verify_path)),
25+
certificate_file_(std::move(certificate_file)),
26+
private_key_file_(std::move(private_key_file)),
27+
ciphers_(std::move(ciphers)),
2828
ssl_options_(ssl_options),
2929
always_verify_peer_(always_verify_peer) {}
3030

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ struct http_sync_connection
4747
timeout_(timeout),
4848
timer_(resolver.get_io_service()),
4949
resolver_(resolver),
50-
resolve_(resolve),
50+
resolve_(std::move(resolve)),
5151
socket_(resolver.get_io_service()) {}
5252

5353
voidinit_socket(string_type/*unused*/const& hostname, string_typeconst& port) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ struct https_sync_connection
6363
timeout_(timeout),
6464
timer_(resolver.get_io_service()),
6565
resolver_(resolver),
66-
resolve_(resolve),
66+
resolve_(std::move(resolve)),
6767
context_(resolver.get_io_service(),
6868
boost::asio::ssl::context::sslv23_client),
6969
socket_(resolver.get_io_service(), context_) {

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,23 +52,23 @@ struct sync_client
5252
sync_client(
5353
bool cache_resolved,bool follow_redirect,bool always_verify_peer,
5454
int timeout, boost::shared_ptr<boost::asio::io_service> service,
55-
optional<string_type>const& certificate_filename =
55+
optional<string_type> certificate_filename =
5656
optional<string_type>(),
57-
optional<string_type>const& verify_path = optional<string_type>(),
58-
optional<string_type>const& certificate_file = optional<string_type>(),
59-
optional<string_type>const& private_key_file = optional<string_type>(),
60-
optional<string_type>const& ciphers = optional<string_type>(),
57+
optional<string_type> verify_path = optional<string_type>(),
58+
optional<string_type> certificate_file = optional<string_type>(),
59+
optional<string_type> private_key_file = optional<string_type>(),
60+
optional<string_type> ciphers = optional<string_type>(),
6161
long ssl_options =0)
6262
: connection_base(cache_resolved, follow_redirect, timeout),
6363
service_ptr(service.get() ? service
6464
: make_shared<boost::asio::io_service>()),
6565
service_(*service_ptr),
6666
resolver_(service_),
67-
certificate_filename_(certificate_filename),
68-
verify_path_(verify_path),
69-
certificate_file_(certificate_file),
70-
private_key_file_(private_key_file),
71-
ciphers_(ciphers),
67+
certificate_filename_(std::move(certificate_filename)),
68+
verify_path_(std::move(verify_path)),
69+
certificate_file_(std::move(certificate_file)),
70+
private_key_file_(std::move(private_key_file)),
71+
ciphers_(std::move(ciphers)),
7272
ssl_options_(ssl_options),
7373
always_verify_peer_(always_verify_peer) {}
7474

‎boost/network/protocol/http/impl/response.ipp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,7 @@ struct basic_response<tags::http_server> {
108108
staticconstchar crlf[] = {'\r','\n'};
109109
std::vector<const_buffer> buffers;
110110
buffers.push_back(to_buffer(status));
111-
for (std::size_t i =0; i < headers.size(); ++i) {
112-
header_type &h = headers[i];
111+
for (auto & h : headers) {
113112
buffers.push_back(buffer(h.name));
114113
buffers.push_back(buffer(name_value_separator));
115114
buffers.push_back(buffer(h.value));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp