mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Add includes for boost in_place
This commit is contained in:
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
BasicApp::BasicApp(std::size_t numberOfThreads)
|
BasicApp::BasicApp(std::size_t numberOfThreads)
|
||||||
{
|
{
|
||||||
work_ = boost::in_place(std::ref(io_service_));
|
work_.emplace (io_service_);
|
||||||
threads_.reserve(numberOfThreads);
|
threads_.reserve(numberOfThreads);
|
||||||
while(numberOfThreads--)
|
while(numberOfThreads--)
|
||||||
threads_.emplace_back(
|
threads_.emplace_back(
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ boost::optional<HTTPClientSSLContext> httpClientSSLContext;
|
|||||||
|
|
||||||
void HTTPClient::initializeSSLContext ()
|
void HTTPClient::initializeSSLContext ()
|
||||||
{
|
{
|
||||||
httpClientSSLContext = boost::in_place();
|
httpClientSSLContext.emplace ();
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -36,6 +36,8 @@
|
|||||||
#include <beast/utility/ci_char_traits.h>
|
#include <beast/utility/ci_char_traits.h>
|
||||||
#include <beast/utility/WrappedSink.h>
|
#include <beast/utility/WrappedSink.h>
|
||||||
|
|
||||||
|
#include <boost/utility/in_place_factory.hpp>
|
||||||
|
|
||||||
namespace ripple {
|
namespace ripple {
|
||||||
|
|
||||||
/** A functor to visit all active peers and retrieve their JSON data */
|
/** A functor to visit all active peers and retrieve their JSON data */
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
#include <boost/asio.hpp>
|
#include <boost/asio.hpp>
|
||||||
#include <boost/asio/ssl.hpp>
|
#include <boost/asio/ssl.hpp>
|
||||||
#include <boost/optional.hpp>
|
#include <boost/optional.hpp>
|
||||||
|
#include <boost/utility/in_place_factory.hpp>
|
||||||
#include <beast/threads/Thread.h>
|
#include <beast/threads/Thread.h>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <condition_variable>
|
#include <condition_variable>
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
#include <ripple/core/SociDB.h>
|
#include <ripple/core/SociDB.h>
|
||||||
#include <boost/asio/io_service.hpp>
|
#include <boost/asio/io_service.hpp>
|
||||||
#include <boost/optional.hpp>
|
#include <boost/optional.hpp>
|
||||||
|
#include <boost/utility/in_place_factory.hpp>
|
||||||
#include <beast/cxx14/memory.h> // <memory>
|
#include <beast/cxx14/memory.h> // <memory>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
|
||||||
|
|||||||
@@ -188,10 +188,10 @@ public:
|
|||||||
, m_sink (prefix(), journal.sink())
|
, m_sink (prefix(), journal.sink())
|
||||||
, m_journal (Journal (m_sink, journal.severity()), Reporting::node)
|
, m_journal (Journal (m_sink, journal.severity()), Reporting::node)
|
||||||
, m_next_port (m_config.listening_endpoint.port() + 1)
|
, 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_when_expire (m_network.now() + std::chrono::seconds (1))
|
||||||
{
|
{
|
||||||
|
m_logic.emplace (
|
||||||
|
clock, *this, *this, *this, m_journal);
|
||||||
logic().setConfig (m_config.config);
|
logic().setConfig (m_config.config);
|
||||||
logic().load ();
|
logic().load ();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ struct STExchange<STBlob, PublicKey>
|
|||||||
get (boost::optional<value_type>& t,
|
get (boost::optional<value_type>& t,
|
||||||
STBlob const& u)
|
STBlob const& u)
|
||||||
{
|
{
|
||||||
t = boost::in_place(Slice(u.data(), u.size()));
|
t.emplace (Slice(u.data(), u.size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ struct STExchange<STBlob, Slice>
|
|||||||
get (boost::optional<value_type>& t,
|
get (boost::optional<value_type>& t,
|
||||||
STBlob const& u)
|
STBlob const& u)
|
||||||
{
|
{
|
||||||
t = boost::in_place(u.data(), u.size());
|
t.emplace (u.data(), u.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
@@ -95,7 +95,7 @@ struct STExchange<STBlob, Buffer>
|
|||||||
get (boost::optional<Buffer>& t,
|
get (boost::optional<Buffer>& t,
|
||||||
STBlob const& u)
|
STBlob const& u)
|
||||||
{
|
{
|
||||||
t = boost::in_place(
|
t.emplace (
|
||||||
u.data(), u.size());
|
u.data(), u.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
#include <ripple/server/impl/Peer.h>
|
#include <ripple/server/impl/Peer.h>
|
||||||
#include <beast/chrono/chrono_io.h>
|
#include <beast/chrono/chrono_io.h>
|
||||||
#include <boost/chrono/chrono_io.hpp>
|
#include <boost/chrono/chrono_io.hpp>
|
||||||
|
#include <boost/utility/in_place_factory.hpp>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
#include <beast/unit_test/suite.h>
|
#include <beast/unit_test/suite.h>
|
||||||
#include <boost/asio/ip/tcp.hpp>
|
#include <boost/asio/ip/tcp.hpp>
|
||||||
#include <boost/optional.hpp>
|
#include <boost/optional.hpp>
|
||||||
|
#include <boost/utility/in_place_factory.hpp>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
|||||||
Reference in New Issue
Block a user