Fix boost compilation issues

This commit is contained in:
seelabs
2018-02-12 15:21:49 -05:00
parent 8e365ea44a
commit 9685e756e6
10 changed files with 18 additions and 36 deletions

View File

@@ -9,6 +9,7 @@
#define BEAST_DETAIL_TYPE_TRAITS_HPP
#include <beast/core/error.hpp>
#include <boost/asio/basic_streambuf.hpp>
#include <boost/asio/buffer.hpp>
#include <boost/asio/io_service.hpp>
#include <iterator>
@@ -16,31 +17,6 @@
#include <type_traits>
#include <string>
// A few workarounds to keep things working
namespace boost {
namespace asio {
// for has_get_io_service
class io_service;
// for is_dynamic_buffer
template<class Allocator>
class basic_streambuf;
namespace detail {
// for is_buffer_sequence
template<class Buffer, class Buffers>
class consuming_buffers;
} // detail
} // asio
} // boost
//------------------------------------------------------------------------------
namespace beast {
namespace detail {

View File

@@ -30,10 +30,10 @@ class buffer_cat_view<Bn...>::const_iterator
"BufferSequence requirements not met");
#endif
std::size_t n_;
std::size_t n_{};
std::tuple<Bn...> const* bn_;
std::array<char, detail::max_sizeof<
typename Bn::const_iterator...>()> buf_;
typename Bn::const_iterator...>()> buf_{};
friend class buffer_cat_view<Bn...>;

View File

@@ -154,6 +154,7 @@ struct is_dynamic_buffer<T, detail::void_t<decltype(
{
};
#if BOOST_VERSION < 106600
// Special case for Boost.Asio which doesn't adhere to
// net-ts but still provides a read_size_helper so things work
template<class Allocator>
@@ -163,6 +164,9 @@ struct is_dynamic_buffer<
};
#endif
#endif
//------------------------------------------------------------------------------
//
// Handler concepts

View File

@@ -264,7 +264,7 @@ read(close_reason& cr,
}
consuming_buffers<Buffers> cb(bs);
{
std::uint8_t b[2];
std::uint8_t b[2] = {0, 0};
buffer_copy(buffer(b), cb);
cr.code = big_uint16_to_native(&b[0]);
cb.consume(2);

View File

@@ -28,7 +28,7 @@ struct verify_info
@li @b 0 Normal algorithm
@li @b 1 Fast algorith
*/
int algorithm; // 0 = normal, 1 = fast
int algorithm{}; // 0 = normal, 1 = fast
/// The path to the data file
path_type dat_path;

View File

@@ -26,11 +26,10 @@
#include <ripple/core/Config.h>
#include <ripple/protocol/Protocol.h>
#include <ripple/beast/utility/PropertyStream.h>
#include <boost/asio/io_service.hpp>
#include <memory>
#include <mutex>
namespace boost { namespace asio { class io_service; } }
namespace ripple {
namespace unl { class Manager; }

View File

@@ -27,6 +27,7 @@
#include <ripple/ledger/ReadView.h>
#include <ripple/net/InfoSub.h>
#include <ripple/protocol/STValidation.h>
#include <boost/asio/io_service.hpp>
#include <memory>
#include <deque>
#include <tuple>

View File

@@ -143,7 +143,9 @@ save(Archive& ar,
ripple::ClosedInterval<T> const& ci,
const unsigned int version)
{
ar << ci.lower() << ci.upper();
auto l = ci.lower();
auto u = ci.upper();
ar << l << u;
}
template <class Archive, class T>
@@ -168,7 +170,8 @@ template <class Archive, class T>
void
save(Archive& ar, ripple::RangeSet<T> const& rs, const unsigned int version)
{
ar << rs.iterative_size();
auto s = rs.iterative_size();
ar << s;
for (auto const& r : rs)
ar << r;
}

View File

@@ -23,6 +23,8 @@
#include <ripple/nodestore/impl/DatabaseShardImp.h>
#include <ripple/nodestore/Manager.h>
#include <fstream>
namespace ripple {
namespace NodeStore {

View File

@@ -1092,8 +1092,6 @@ public:
auto alice = Account("alice");
auto queued = ter(terQUEUED);
BEAST_EXPECT(env.current()->fees().base == 10);
checkMetrics(env, 0, boost::none, 0, 1, 256);
@@ -1133,7 +1131,6 @@ public:
{"maximum_txn_in_ledger", "5"} }));
auto alice = Account("alice");
auto queued = ter(terQUEUED);
checkMetrics(env, 0, boost::none, 0, 2, 256);