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

0.12-devel to be C++11-only#569

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from1 commit
Commits
Show all changes
36 commits
Select commitHold shift + click to select a range
a370594
Run clang-tidy with all checks.
deanberrisOct 28, 2015
44bd36b
Manual changes to update style and fix breakages
deanberrisOct 28, 2015
5f6e9ee
Changes to make things build
deanberrisOct 31, 2015
7b88a41
Reintroduce missing code for parsing query maps
deanberrisOct 31, 2015
6349c11
clang-tidy modernize-.* all the things
deanberrisNov 2, 2015
6d8879c
Upgrade travis config
deanberrisNov 2, 2015
65a0e6e
Fix typo in URL
deanberrisNov 2, 2015
feec209
Fix another typo on the URL.
deanberrisNov 2, 2015
4847865
Make travis wait for a Boost build to finish
deanberrisNov 2, 2015
e19af74
Change level of travis_wait call; chmod +x .sh files
deanberrisNov 2, 2015
abe68b4
Only support Boost 1.59 for now.
deanberrisNov 2, 2015
b10dfbb
Only produce shared+multithreaded debug & release boost libs
deanberrisNov 2, 2015
8cb4c16
Looks like we need static libs too
deanberrisNov 2, 2015
198dd07
Integrate travis; Use Boost 1.57 at least; Always use shared libs fro…
deanberrisNov 2, 2015
f6c7ee6
Use the dynamic version of Boost.Test always.
deanberrisNov 2, 2015
de7c710
Use v4 again instead of just address
deanberrisNov 4, 2015
39a2705
v4() for real this time
deanberrisNov 4, 2015
2e3340f
Change test to fetch different targets
deanberrisNov 12, 2015
7e0f93e
Simplify http test
deanberrisNov 12, 2015
552401b
Use ninja-build
deanberrisNov 12, 2015
19beafb
Update cmake
deanberrisNov 12, 2015
99f6168
Use updated cmake to support ninja-build
deanberrisNov 12, 2015
937d589
Travis cannot handle ninja builds yet, probably to lack of resources …
deanberrisNov 12, 2015
d5ec24e
j4 is too much. :(
deanberrisNov 12, 2015
d661fcc
Check with the sanitizers
deanberrisNov 12, 2015
5751338
Honor the CMAKE_CXX_FLAGS environment variable
deanberrisNov 12, 2015
511dd04
Print latest log properly
deanberrisNov 12, 2015
9fbc300
Fix some issues with the (deprecated) synchronous client implementati…
deanberrisNov 16, 2015
2f2239c
Only use libc++ if in OS X
deanberrisNov 16, 2015
4be4eae
Issue identified with memory sanitizer
deanberrisNov 16, 2015
600daff
Fix unsafe usage of boost::as_literal, caught by memory sanitiser
deanberrisNov 16, 2015
03870ca
Force use of size_t in distance calculation
deanberrisNov 16, 2015
9bad07c
Removing noexcept from defaulted move constructor
deanberrisNov 18, 2015
2f2c021
Track origins for memsan runs
deanberrisNov 18, 2015
7f70dac
Exclude msan builds from g++
deanberrisNov 18, 2015
8a8279a
Do not use msan yet; Boost seems to be not msan-clean
deanberrisNov 18, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
clang-tidy modernize-.* all the things
  • Loading branch information
@deanberris
deanberris committedNov 2, 2015
commit6349c11994c7a136bbea54b4693df642364376d9
2 changes: 1 addition & 1 deletionboost/network/message/directives/remove_header.hpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -21,7 +21,7 @@ template <class T>
struct remove_header_directive {

explicit remove_header_directive(T header_name)
: header_name_(header_name) {};
: header_name_(std::move(header_name)) {};

template <class MessageTag>
void operator()(basic_message<MessageTag>& msg) const {
Expand Down
20 changes: 10 additions & 10 deletionsboost/network/protocol/http/client/async_impl.hpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -40,23 +40,23 @@ struct async_client
async_client(bool cache_resolved, bool follow_redirect,
bool always_verify_peer, int timeout,
boost::shared_ptr<boost::asio::io_service> service,
optional<string_type>const& certificate_filename,
optional<string_type>const& verify_path,
optional<string_type>const& certificate_file,
optional<string_type>const& private_key_file,
optional<string_type>const& ciphers, long ssl_options)
optional<string_type> certificate_filename,
optional<string_type> verify_path,
optional<string_type> certificate_file,
optional<string_type> private_key_file,
optional<string_type> ciphers, long ssl_options)
: connection_base(cache_resolved, follow_redirect, timeout),
service_ptr(service.get()
? service
: boost::make_shared<boost::asio::io_service>()),
service_(*service_ptr),
resolver_(service_),
sentinel_(new boost::asio::io_service::work(service_)),
certificate_filename_(certificate_filename),
verify_path_(verify_path),
certificate_file_(certificate_file),
private_key_file_(private_key_file),
ciphers_(ciphers),
certificate_filename_(std::move(certificate_filename)),
verify_path_(std::move(verify_path)),
certificate_file_(std::move(certificate_file)),
private_key_file_(std::move(private_key_file)),
ciphers_(std::move(ciphers)),
ssl_options_(ssl_options),
always_verify_peer_(always_verify_peer) {
connection_base::resolver_strand_.reset(
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -78,9 +78,9 @@ struct http_async_connection
is_timedout_(false),
follow_redirect_(follow_redirect),
resolver_(resolver),
resolve_(resolve),
resolve_(std::move(resolve)),
request_strand_(resolver.get_io_service()),
delegate_(delegate) {}
delegate_(std::move(delegate)) {}

// This is the main entry point for the connection/request pipeline.
// We're
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -22,28 +22,29 @@ namespace impl {
struct normal_delegate : connection_delegate {
explicit normal_delegate(asio::io_service &service);

void connect(asio::ip::tcp::endpoint &endpoint, std::string host, boost::uint16_t source_port,
function<void(system::error_code const &)> handler) override;
void write(
asio::streambuf &command_streambuf,
function<void(system::error_code const &, size_t)> handler) override;
void read_some(
asio::mutable_buffers_1 const &read_buffer,
function<void(system::error_code const &, size_t)> handler) override;
void connect(asio::ip::tcp::endpoint &endpoint, std::string host,
boost::uint16_t source_port,
function<void(system::error_code const &)> handler) override;
void write(asio::streambuf &command_streambuf,
function<void(system::error_code const &, size_t)> handler)
override;
void read_some(asio::mutable_buffers_1 const &read_buffer,
function<void(system::error_code const &, size_t)> handler)
override;
void disconnect() override;
~normal_delegate() override;
~normal_delegate() override = default;

normal_delegate(normal_delegate const &) = delete;
normal_delegate &operator=(normal_delegate) = delete;

private:
asio::io_service &service_;
std::unique_ptr<asio::ip::tcp::socket> socket_;

normal_delegate(normal_delegate const &); // = delete
normal_delegate &operator=(normal_delegate); // = delete
};

} // namespace impl
} // namespace http
}// namespace impl
}// namespace http
} // namespace network
} // namespace boost
}// namespace boost

#endif // BOOST_NETWORK_PROTOCOL_HTTP_CLIENT_CONNECTION_NORMAL_DELEGATE_20110819
#endif// BOOST_NETWORK_PROTOCOL_HTTP_CLIENT_CONNECTION_NORMAL_DELEGATE_20110819
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -54,6 +54,4 @@ void boost::network::http::impl::normal_delegate::disconnect() {
}
}

boost::network::http::impl::normal_delegate::~normal_delegate() {}

#endif // BOOST_NETWORK_PROTOCOL_HTTP_CLIENT_CONNECTION_NORMAL_DELEGATE_IPP_20110819
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,11 +20,11 @@ boost::network::http::impl::ssl_delegate::ssl_delegate(
optional<std::string> ciphers,
long ssl_options)
: service_(service),
certificate_filename_(certificate_filename),
verify_path_(verify_path),
certificate_file_(certificate_file),
private_key_file_(private_key_file),
ciphers_(ciphers),
certificate_filename_(std::move(certificate_filename)),
verify_path_(std::move(verify_path)),
certificate_file_(std::move(certificate_file)),
private_key_file_(std::move(private_key_file)),
ciphers_(std::move(ciphers)),
ssl_options_(ssl_options),
always_verify_peer_(always_verify_peer) {}

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -47,7 +47,7 @@ struct http_sync_connection
timeout_(timeout),
timer_(resolver.get_io_service()),
resolver_(resolver),
resolve_(resolve),
resolve_(std::move(resolve)),
socket_(resolver.get_io_service()) {}

void init_socket(string_type /*unused*/const& hostname, string_type const& port) {
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -63,7 +63,7 @@ struct https_sync_connection
timeout_(timeout),
timer_(resolver.get_io_service()),
resolver_(resolver),
resolve_(resolve),
resolve_(std::move(resolve)),
context_(resolver.get_io_service(),
boost::asio::ssl::context::sslv23_client),
socket_(resolver.get_io_service(), context_) {
Expand Down
20 changes: 10 additions & 10 deletionsboost/network/protocol/http/client/sync_impl.hpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -52,23 +52,23 @@ struct sync_client
sync_client(
bool cache_resolved, bool follow_redirect, bool always_verify_peer,
int timeout, boost::shared_ptr<boost::asio::io_service> service,
optional<string_type>const& certificate_filename =
optional<string_type> certificate_filename =
optional<string_type>(),
optional<string_type>const& verify_path = optional<string_type>(),
optional<string_type>const& certificate_file = optional<string_type>(),
optional<string_type>const& private_key_file = optional<string_type>(),
optional<string_type>const& ciphers = optional<string_type>(),
optional<string_type> verify_path = optional<string_type>(),
optional<string_type> certificate_file = optional<string_type>(),
optional<string_type> private_key_file = optional<string_type>(),
optional<string_type> ciphers = optional<string_type>(),
long ssl_options = 0)
: connection_base(cache_resolved, follow_redirect, timeout),
service_ptr(service.get() ? service
: make_shared<boost::asio::io_service>()),
service_(*service_ptr),
resolver_(service_),
certificate_filename_(certificate_filename),
verify_path_(verify_path),
certificate_file_(certificate_file),
private_key_file_(private_key_file),
ciphers_(ciphers),
certificate_filename_(std::move(certificate_filename)),
verify_path_(std::move(verify_path)),
certificate_file_(std::move(certificate_file)),
private_key_file_(std::move(private_key_file)),
ciphers_(std::move(ciphers)),
ssl_options_(ssl_options),
always_verify_peer_(always_verify_peer) {}

Expand Down
3 changes: 1 addition & 2 deletionsboost/network/protocol/http/impl/response.ipp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -108,8 +108,7 @@ struct basic_response<tags::http_server> {
static const char crlf[] = {'\r', '\n'};
std::vector<const_buffer> buffers;
buffers.push_back(to_buffer(status));
for (std::size_t i = 0; i < headers.size(); ++i) {
header_type &h = headers[i];
for (auto & h : headers) {
buffers.push_back(buffer(h.name));
buffers.push_back(buffer(name_value_separator));
buffers.push_back(buffer(h.value));
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -65,7 +65,7 @@ struct pooled_connection_policy : resolver_policy<Tag>::type {
ssl_options)),
resolver_(resolver),
connection_follow_redirect_(follow_redirect),
get_connection_(get_connection),
get_connection_(std::move(get_connection)),
certificate_filename_(certificate_filename),
verify_path_(verify_path),
certificate_file_(certificate_file),
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -559,7 +559,7 @@ struct async_connection
headers_buffer.consume(headers_buffer.size());
headers_already_sent = true;
thread_pool().post(callback);
pending_actions_list::iterator start = pending_actions.begin(),
auto start = pending_actions.begin(),
end = pending_actions.end();
while (start != end) {
thread_pool().post(*start++);
Expand Down
2 changes: 1 addition & 1 deletionboost/network/protocol/http/server/sync_connection.hpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -84,7 +84,7 @@ struct sync_connection
if (done) {
if (request_.method[0] == 'P') {
// look for the content-length header
typename std::vector<typename request_header<Tag>::type>::iterator
auto
it = std::find_if(request_.headers.begin(),
request_.headers.end(), is_content_length());
if (it == request_.headers.end()) {
Expand Down
29 changes: 15 additions & 14 deletionsboost/network/protocol/stream_handler.hpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,22 +10,23 @@
#pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)

#include <cstddef>
#include <boost/asio/detail/throw_error.hpp>
#include <boost/asio/error.hpp>
#include <boost/asio.hpp>
#ifdef BOOST_NETWORK_ENABLE_HTTPS
#include <boost/asio/ssl.hpp>
#endif
#include <boost/asio/detail/push_options.hpp>
#include <boost/asio/async_result.hpp>
#include <boost/asio/async_result.hpp>
#include <boost/asio/basic_socket.hpp>
#include <boost/asio/detail/config.hpp>
#include <boost/asio/detail/config.hpp>
#include <boost/asio/detail/handler_type_requirements.hpp>
#include <boost/asio/detail/push_options.hpp>
#include <boost/asio/detail/throw_error.hpp>
#include <boost/asio/error.hpp>
#include <boost/asio/stream_socket_service.hpp>
#include <boost/asio/async_result.hpp>
#include <boost/make_shared.hpp>
#include <boost/asio/detail/config.hpp>
#include <boost/asio/async_result.hpp>
#include <boost/asio/basic_socket.hpp>
#include <cstddef>

#ifdef BOOST_NETWORK_ENABLE_HTTPS
#include <boost/asio/ssl.hpp>
#endif

namespace boost {
namespace network {
Expand All@@ -43,12 +44,12 @@ typedef boost::asio::ssl::context ssl_context;
struct stream_handler {
public:
stream_handler(boost::shared_ptr<tcp_socket> socket)
: tcp_sock_(socket), ssl_enabled(false) {}
: tcp_sock_(std::move(socket)), ssl_enabled(false) {}

~stream_handler(){}
~stream_handler()= default;

stream_handler(boost::shared_ptr<ssl_socket> socket)
: ssl_sock_(socket), ssl_enabled(true) {}
: ssl_sock_(std::move(socket)), ssl_enabled(true) {}

stream_handler(boost::asio::io_service& io,
boost::shared_ptr<ssl_context> ctx =
Expand Down
4 changes: 2 additions & 2 deletionsboost/network/uri/directives/authority.hpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,8 +14,8 @@ namespace uri {

struct authority_directive {

explicit authority_directive(conststd::string&authority)
: authority_(authority) {}
explicit authority_directive(std::string authority)
: authority_(std::move(authority)) {}

template <class Uri>
void operator()(Uri &uri) const {
Expand Down
4 changes: 2 additions & 2 deletionsboost/network/uri/directives/fragment.hpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,8 +16,8 @@ namespace network {
namespace uri {
struct fragment_directive {

explicit fragment_directive(conststd::string&fragment)
: fragment_(fragment) {}
explicit fragment_directive(std::string fragment)
: fragment_(std::move(fragment)) {}

template <class Uri>
void operator()(Uri &uri) const {
Expand Down
2 changes: 1 addition & 1 deletionboost/network/uri/directives/host.hpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,7 @@ namespace network {
namespace uri {
struct host_directive {

explicit host_directive(conststd::string& host) : host_(host) {}
explicit host_directive(std::string host) : host_(std::move(host)) {}

template <class Uri>
void operator()(Uri &uri) const {
Expand Down
4 changes: 2 additions & 2 deletionsboost/network/uri/directives/path.hpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@ namespace network {
namespace uri {
struct path_directive {

explicit path_directive(conststd::string&path) : path_(path) {}
explicit path_directive(std::string path) : path_(std::move(path)) {}

template <class Uri>
void operator()(Uri &uri) const {
Expand All@@ -28,7 +28,7 @@ struct path_directive {

struct encoded_path_directive {

explicit encoded_path_directive(conststd::string& path) : path_(path) {}
explicit encoded_path_directive(std::string path) : path_(std::move(path)) {}

void operator()(uri &uri_) const {
std::string encoded_path;
Expand Down
2 changes: 1 addition & 1 deletionboost/network/uri/directives/port.hpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@ namespace network {
namespace uri {
struct port_directive {

explicit port_directive(conststd::string&port) : port_(port) {}
explicit port_directive(std::string port) : port_(std::move(port)) {}

explicit port_directive(boost::uint16_t port)
: port_(boost::lexical_cast<std::string>(port)) {}
Expand Down
6 changes: 3 additions & 3 deletionsboost/network/uri/directives/query.hpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -17,7 +17,7 @@ namespace network {
namespace uri {
struct query_directive {

explicit query_directive(conststd::string& query) : query_(query) {}
explicit query_directive(std::string query) : query_(std::move(query)) {}

template <class Uri>
void operator()(Uri &uri) const {
Expand All@@ -34,8 +34,8 @@ inline query_directive query(const std::string &query) {

struct query_key_query_directive {

query_key_query_directive(conststd::string& key,conststd::string& query)
: key_(key), query_(query) {}
query_key_query_directive(std::string key, std::string query)
: key_(std::move(key)), query_(std::move(query)) {}

template <class Uri>
void operator()(Uri &uri) const {
Expand Down
2 changes: 1 addition & 1 deletionboost/network/uri/directives/scheme.hpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@ namespace network {
namespace uri {
struct scheme_directive {

explicit scheme_directive(conststd::string&scheme) : scheme(scheme) {}
explicit scheme_directive(std::string scheme) : scheme(std::move(scheme)) {}

template <class Uri>
void operator()(Uri &uri) const {
Expand Down
4 changes: 2 additions & 2 deletionsboost/network/uri/directives/user_info.hpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,8 +15,8 @@ namespace network {
namespace uri {
struct user_info_directive {

explicit user_info_directive(conststd::string&user_info)
: user_info_(user_info) {}
explicit user_info_directive(std::string user_info)
: user_info_(std::move(user_info)) {}

template <class Uri>
void operator()(Uri &uri) const {
Expand Down
2 changes: 1 addition & 1 deletionboost/network/uri/uri.hpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -46,7 +46,7 @@ class BOOST_URI_DECL uri {
// parse();
//}

uri(conststring_type&str) : uri_(str), is_valid_(false) { parse(); }
uri(string_type str) : uri_(std::move(str)), is_valid_(false) { parse(); }

template <class FwdIter>
uri(const FwdIter &first, const FwdIter &last)
Expand Down
4 changes: 2 additions & 2 deletionsboost/network/utils/thread_pool.hpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -35,8 +35,8 @@ struct basic_thread_pool {
io_service_ptr io_service = io_service_ptr(),
worker_threads_ptr worker_threads = worker_threads_ptr())
: threads_(threads),
io_service_(io_service),
worker_threads_(worker_threads),
io_service_(std::move(io_service)),
worker_threads_(std::move(worker_threads)),
sentinel_() {
bool commit = false;
BOOST_SCOPE_EXIT_TPL(
Expand Down
2 changes: 1 addition & 1 deletionlibs/mime/test/mime-roundtrip.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -107,7 +107,7 @@ test_suite *init_unit_test_suite(int, char **)
#ifdef BOOST_TEST_DYN_LINK
true;
#else
0;
nullptr;
#endif
}

Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp