Fix warnings and compile errors

This commit is contained in:
Vinnie Falco
2014-08-20 17:03:54 -07:00
parent a86f0a743c
commit 7230ef41ee
7 changed files with 14 additions and 41 deletions

View File

@@ -201,7 +201,7 @@ private:
{
element* const p (new element (field, value));
list_.push_back (*p);
auto const iter (set_.insert_commit (*p, d));
set_.insert_commit (*p, d);
return;
}
// If field already exists, append comma

View File

@@ -32,7 +32,7 @@ public:
basic_message m;
basic_message::parser p (m, true);
auto result (p.write (boost::asio::buffer(text)));
auto result2 (p.eof());
p.eof();
return std::make_pair (std::move(m), result.first);
}

View File

@@ -29,40 +29,14 @@ namespace ripple {
class peer_info_test : public beast::unit_test::suite
{
public:
// Parse a comma delimited list of strings
// Leading and trailing whitespace is removed from each element
static
std::vector <std::string>
parse_list (std::string const& value)
{
std::vector <std::string> list;
auto first (value.begin());
auto last (value.end());
for(;;)
{
auto const found (std::find (first, last, ','));
if (found != first)
{
auto p0 (first);
auto p1 (found - 1);
}
if (found == last)
break;
first = found + 1;
}
return list;
}
void
run()
{
expect (beast::http::rfc2616::trim("x") == "x");
pass();
}
};
BEAST_DEFINE_TESTSUITE(peer_info,overlay,ripple);
BEAST_DEFINE_TESTSUITE_MANUAL(peer_info,overlay,ripple);
} // ripple

View File

@@ -32,14 +32,14 @@
#ifndef RIPPLE_TYPES_BASE58_H
#define RIPPLE_TYPES_BASE58_H
#include <ripple/types/api/Blob.h>
#include <array>
#include <cassert>
#include <iterator>
#include <string>
#include <type_traits>
#include <vector>
#include <ripple/types/api/Blob.h>
namespace ripple {
/** Performs Base 58 encoding and decoding. */

View File

@@ -20,13 +20,12 @@
#ifndef RIPPLE_TYPES_CRYPTOIDENTIFIER_H_INCLUDED
#define RIPPLE_TYPES_CRYPTOIDENTIFIER_H_INCLUDED
#include <ripple/types/api/Base58.h>
#include <ripple/types/api/IdentifierStorage.h>
#include <beast/ByteOrder.h>
#include <beast/crypto/Sha256.h>
#include <array>
#include <ripple/types/api/Base58.h>
#include <ripple/types/api/IdentifierStorage.h>
#include <cstring>
namespace ripple {
@@ -69,7 +68,7 @@ public:
value_type& value)
{
value.storage()[0] = Token;
bassert (std::distance (begin, end) == size);
assert (std::distance (begin, end) == size);
std::copy (begin, end, value.begin());
if (Checked)
{

View File

@@ -22,8 +22,8 @@
#include <beast/crypto/MurmurHash.h>
#include <beast/container/hardened_hash.h>
#include <array>
#include <cassert>
namespace ripple {
@@ -84,13 +84,13 @@ public:
reference operator[](size_type i)
{
bassert (i < size);
assert (i < size);
return m_storage[pre_size+i];
}
const_reference operator[](size_type i) const
{
bassert (i < size);
assert (i < size);
return m_storage[pre_size+i];
}

View File

@@ -71,7 +71,7 @@ public:
std::array <std::uint8_t, RippleLedgerHash::size> buf;
fillrand (buf.data(), buf.size(), gen);
RippleLedgerHash h (buf.data(), buf.data() + buf.size());
auto const result (table.insert (std::make_pair (h, Entry())));
table.insert (std::make_pair (h, Entry()));
}
pass();
}