From c729ceab208c086ccf0e3aff02684c9e7b147565 Mon Sep 17 00:00:00 2001 From: seelabs Date: Thu, 13 Aug 2015 14:48:01 -0400 Subject: [PATCH] Add includes for boost `in_place` --- src/ripple/app/main/BasicApp.cpp | 2 +- src/ripple/net/impl/HTTPClient.cpp | 2 +- src/ripple/overlay/impl/OverlayImpl.cpp | 2 ++ src/ripple/overlay/tests/short_read.test.cpp | 1 + src/ripple/peerfinder/impl/PeerfinderManager.cpp | 1 + src/ripple/peerfinder/sim/Tests.cpp | 4 ++-- src/ripple/protocol/PublicKey.h | 2 +- src/ripple/protocol/STExchange.h | 4 ++-- src/ripple/server/impl/ServerImpl.cpp | 1 + src/ripple/server/tests/Server.test.cpp | 1 + 10 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/ripple/app/main/BasicApp.cpp b/src/ripple/app/main/BasicApp.cpp index 0dff41f1f6..0124c0d8d8 100644 --- a/src/ripple/app/main/BasicApp.cpp +++ b/src/ripple/app/main/BasicApp.cpp @@ -23,7 +23,7 @@ BasicApp::BasicApp(std::size_t numberOfThreads) { - work_ = boost::in_place(std::ref(io_service_)); + work_.emplace (io_service_); threads_.reserve(numberOfThreads); while(numberOfThreads--) threads_.emplace_back( diff --git a/src/ripple/net/impl/HTTPClient.cpp b/src/ripple/net/impl/HTTPClient.cpp index d33c0e9aff..e333aecdda 100644 --- a/src/ripple/net/impl/HTTPClient.cpp +++ b/src/ripple/net/impl/HTTPClient.cpp @@ -81,7 +81,7 @@ boost::optional httpClientSSLContext; void HTTPClient::initializeSSLContext () { - httpClientSSLContext = boost::in_place(); + httpClientSSLContext.emplace (); } //------------------------------------------------------------------------------ diff --git a/src/ripple/overlay/impl/OverlayImpl.cpp b/src/ripple/overlay/impl/OverlayImpl.cpp index 028efc75e4..034ac76e2d 100644 --- a/src/ripple/overlay/impl/OverlayImpl.cpp +++ b/src/ripple/overlay/impl/OverlayImpl.cpp @@ -36,6 +36,8 @@ #include #include +#include + namespace ripple { /** A functor to visit all active peers and retrieve their JSON data */ diff --git a/src/ripple/overlay/tests/short_read.test.cpp b/src/ripple/overlay/tests/short_read.test.cpp index 780f2a399f..af050d8dc0 100644 --- a/src/ripple/overlay/tests/short_read.test.cpp +++ b/src/ripple/overlay/tests/short_read.test.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/src/ripple/peerfinder/impl/PeerfinderManager.cpp b/src/ripple/peerfinder/impl/PeerfinderManager.cpp index d166636429..f8f9d31250 100644 --- a/src/ripple/peerfinder/impl/PeerfinderManager.cpp +++ b/src/ripple/peerfinder/impl/PeerfinderManager.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include // #include diff --git a/src/ripple/peerfinder/sim/Tests.cpp b/src/ripple/peerfinder/sim/Tests.cpp index 2c624e3ac1..93a7fa86ee 100644 --- a/src/ripple/peerfinder/sim/Tests.cpp +++ b/src/ripple/peerfinder/sim/Tests.cpp @@ -188,10 +188,10 @@ public: , m_sink (prefix(), journal.sink()) , m_journal (Journal (m_sink, journal.severity()), Reporting::node) , m_next_port (m_config.listening_endpoint.port() + 1) - , m_logic (boost::in_place ( - std::ref (clock), std::ref (*this), std::ref (*this), std::ref (*this), m_journal)) , m_when_expire (m_network.now() + std::chrono::seconds (1)) { + m_logic.emplace ( + clock, *this, *this, *this, m_journal); logic().setConfig (m_config.config); logic().load (); } diff --git a/src/ripple/protocol/PublicKey.h b/src/ripple/protocol/PublicKey.h index 342e9dc97f..aea5939b9c 100644 --- a/src/ripple/protocol/PublicKey.h +++ b/src/ripple/protocol/PublicKey.h @@ -145,7 +145,7 @@ struct STExchange get (boost::optional& t, STBlob const& u) { - t = boost::in_place(Slice(u.data(), u.size())); + t.emplace (Slice(u.data(), u.size())); } static diff --git a/src/ripple/protocol/STExchange.h b/src/ripple/protocol/STExchange.h index c2be05b297..a7d49d60cd 100644 --- a/src/ripple/protocol/STExchange.h +++ b/src/ripple/protocol/STExchange.h @@ -72,7 +72,7 @@ struct STExchange get (boost::optional& t, STBlob const& u) { - t = boost::in_place(u.data(), u.size()); + t.emplace (u.data(), u.size()); } static @@ -95,7 +95,7 @@ struct STExchange get (boost::optional& t, STBlob const& u) { - t = boost::in_place( + t.emplace ( u.data(), u.size()); } diff --git a/src/ripple/server/impl/ServerImpl.cpp b/src/ripple/server/impl/ServerImpl.cpp index 310a896d4c..7908d4ca59 100644 --- a/src/ripple/server/impl/ServerImpl.cpp +++ b/src/ripple/server/impl/ServerImpl.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include diff --git a/src/ripple/server/tests/Server.test.cpp b/src/ripple/server/tests/Server.test.cpp index 6ba9dfd042..2ada8c2f4f 100644 --- a/src/ripple/server/tests/Server.test.cpp +++ b/src/ripple/server/tests/Server.test.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include