mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Cleanups:
* Reduce Beast dependencies * Remove unnecessary includes * Don't use deprecated bassert macros * Don't use beast::String in Json::Value
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include <ripple/resource/Consumer.h>
|
||||
#include <ripple/resource/impl/Entry.h>
|
||||
#include <ripple/resource/impl/Logic.h>
|
||||
#include <cassert>
|
||||
|
||||
namespace ripple {
|
||||
namespace Resource {
|
||||
@@ -97,31 +98,31 @@ Disposition Consumer::disposition() const
|
||||
|
||||
Disposition Consumer::charge (Charge const& what)
|
||||
{
|
||||
bassert (m_entry != nullptr);
|
||||
assert (m_entry != nullptr);
|
||||
return m_logic->charge (*m_entry, what);
|
||||
}
|
||||
|
||||
bool Consumer::warn ()
|
||||
{
|
||||
bassert (m_entry != nullptr);
|
||||
assert (m_entry != nullptr);
|
||||
return m_logic->warn (*m_entry);
|
||||
}
|
||||
|
||||
bool Consumer::disconnect ()
|
||||
{
|
||||
bassert (m_entry != nullptr);
|
||||
assert (m_entry != nullptr);
|
||||
return m_logic->disconnect (*m_entry);
|
||||
}
|
||||
|
||||
int Consumer::balance()
|
||||
{
|
||||
bassert (m_entry != nullptr);
|
||||
assert (m_entry != nullptr);
|
||||
return m_logic->balance (*m_entry);
|
||||
}
|
||||
|
||||
Entry& Consumer::entry()
|
||||
{
|
||||
bassert (m_entry != nullptr);
|
||||
assert (m_entry != nullptr);
|
||||
return *m_entry;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <ripple/resource/impl/Tuning.h>
|
||||
#include <beast/chrono/abstract_clock.h>
|
||||
#include <beast/intrusive/List.h>
|
||||
#include <cassert>
|
||||
|
||||
namespace ripple {
|
||||
namespace Resource {
|
||||
@@ -58,7 +59,7 @@ struct Entry
|
||||
case kindOutbound: return key->address.to_string();
|
||||
case kindUnlimited: return std::string ("\"") + key->name + "\"";
|
||||
default:
|
||||
bassertfalse;
|
||||
assert(false);
|
||||
}
|
||||
|
||||
return "(undefined)";
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <beast/chrono/abstract_clock.h>
|
||||
#include <beast/Insight.h>
|
||||
#include <beast/utility/PropertyStream.h>
|
||||
#include <cassert>
|
||||
#include <mutex>
|
||||
|
||||
namespace ripple {
|
||||
@@ -429,7 +430,7 @@ public:
|
||||
admin_.iterator_to (entry));
|
||||
break;
|
||||
default:
|
||||
bassertfalse;
|
||||
assert(false);
|
||||
break;
|
||||
}
|
||||
inactive_.push_back (entry);
|
||||
|
||||
Reference in New Issue
Block a user