Reduce RippleD dependencies on Beast:

* Use static_assert where appropriate
* Use std::min and std::max where appropriate
* Simplify RippleD error reporting
* Remove use of beast::RandomAccessFile
This commit is contained in:
Nik Bougalis
2014-10-14 00:29:35 -07:00
committed by Vinnie Falco
parent e005cfd70e
commit f9fc9a3518
5 changed files with 23 additions and 30 deletions

View File

@@ -31,7 +31,8 @@ EncodedBlob::prepare (NodeObject::Ptr const& object)
m_data.ensureSize (m_size);
// These sizes must be the same!
static_bassert (sizeof (std::uint32_t) == sizeof (object->getLedgerIndex ()));
static_assert (sizeof (std::uint32_t) == sizeof (object->getLedgerIndex ()),
"Ledger Indices must be exactly 32-bits long.");
{
std::uint32_t* buf = static_cast <std::uint32_t*> (m_data.getData ());