beast cleanup and tidying:

* Replace custom types with C++11 <cstdint> types
* Fix sqlite integer intos and uses
* Fix String implicit integer constructors
* Escape the enclosing namespace in sqdb
* Replace contract checks with assert
* Make many header files compile independently
* Remove the dependence on beast_core.h in many places
* Remove unused or obsolete classes and functions
* Remove unused or obsolete macros
* Remove unused network functions and files
* Remove unused or obsolete classes:
  - ChildProcess
  - HighResolutionTimer
  - InterProcessLock
  - Throw
  - TrackedMutex
  - UntrackedMutex
  - XmlDocument
  - XmlElement
This commit is contained in:
Vinnie Falco
2014-03-22 09:43:11 -07:00
parent 936f45c7ec
commit b2d97703c6
440 changed files with 3139 additions and 9643 deletions

View File

@@ -283,7 +283,7 @@ public:
{
Context::Scope scope (m_context);
map ["trusted"] = beast::uint32 (
map ["trusted"] = std::uint32_t (
m_logic.m_chosenList ?
m_logic.m_chosenList->size() : 0);

View File

@@ -54,11 +54,11 @@ public:
void fetch (Results& results, beast::Journal journal)
{
beast::int64 const fileSize (m_file.getSize ());
std::int64_t const fileSize (m_file.getSize ());
if (fileSize != 0)
{
if (fileSize < std::numeric_limits<beast::int32>::max())
if (fileSize < std::numeric_limits<std::int32_t>::max())
{
beast::MemoryBlock buffer (fileSize);
beast::RandomAccessFile f;

View File

@@ -99,7 +99,7 @@ public:
struct TestSource : Source
{
TestSource (beast::String const& name, beast::uint32 start, beast::uint32 end)
TestSource (beast::String const& name, std::uint32_t start, std::uint32_t end)
: m_name (name)
, m_start (start)
, m_end (end)
@@ -130,7 +130,7 @@ public:
results.message = beast::String::empty;
results.list.reserve (numberOfTestValidators);
for (beast::uint32 i = m_start ; i < m_end; ++i)
for (std::uint32_t i = m_start ; i < m_end; ++i)
{
Item item;;
item.publicKey = RipplePublicKey::createFromInteger (i);
@@ -178,8 +178,8 @@ public:
for (int i = 1; i <= numberofTestSources; ++i)
{
beast::String const name (beast::String::fromNumber (i));
beast::uint32 const start = r.nextInt (numberOfTestValidators);
beast::uint32 const end = start + r.nextInt (numberOfTestValidators);
std::uint32_t const start = r.nextInt (numberOfTestValidators);
std::uint32_t const end = start + r.nextInt (numberOfTestValidators);
logic.add (new TestSource (name, start, end));
}
}