mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Fix lots of places I used 'empty' instead of 'clear'. This is why I like 'isEmpty'.
This commit is contained in:
@@ -215,8 +215,8 @@ void Application::loadOldLedger()
|
||||
std::cout << "No Ledger found?" << std::endl;
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
lastLedger->setClosed();
|
||||
|
||||
Ledger::pointer openLedger = boost::make_shared<Ledger>(false, boost::ref(*lastLedger));
|
||||
mMasterLedger.switchLedgers(lastLedger, openLedger);
|
||||
mNetOps.setLastCloseTime(lastLedger->getCloseTimeNC());
|
||||
|
||||
@@ -124,7 +124,7 @@ void LedgerAcquire::done()
|
||||
setComplete();
|
||||
mLock.lock();
|
||||
triggers = mOnComplete;
|
||||
mOnComplete.empty();
|
||||
mOnComplete.clear();
|
||||
mLock.unlock();
|
||||
|
||||
if (mLedger)
|
||||
|
||||
@@ -69,6 +69,6 @@ CKey::pointer PubKeyCache::store(const NewcoinAddress& id, const CKey::pointer&
|
||||
void PubKeyCache::clear()
|
||||
{
|
||||
boost::mutex::scoped_lock sl(mLock);
|
||||
mCache.empty();
|
||||
mCache.clear();
|
||||
}
|
||||
// vim:ts=4
|
||||
|
||||
@@ -120,8 +120,8 @@ std::auto_ptr<SerializedType> STObject::makeDeserializedObject(SerializedTypeID
|
||||
|
||||
void STObject::set(const std::vector<SOElement::ptr>& type)
|
||||
{
|
||||
mData.empty();
|
||||
mType.empty();
|
||||
mData.clear();
|
||||
mType.clear();
|
||||
|
||||
BOOST_FOREACH(const SOElement::ptr& elem, type)
|
||||
{
|
||||
@@ -138,7 +138,7 @@ bool STObject::setType(const std::vector<SOElement::ptr> &type)
|
||||
boost::ptr_vector<SerializedType> newData;
|
||||
bool valid = true;
|
||||
|
||||
mType.empty();
|
||||
mType.clear();
|
||||
BOOST_FOREACH(const SOElement::ptr& elem, type)
|
||||
{
|
||||
bool match = false;
|
||||
@@ -204,7 +204,7 @@ bool STObject::isFieldAllowed(SField::ref field)
|
||||
|
||||
bool STObject::set(SerializerIterator& sit, int depth)
|
||||
{ // return true = terminated with end-of-object
|
||||
mData.empty();
|
||||
mData.clear();
|
||||
while (!sit.empty())
|
||||
{
|
||||
int type, field;
|
||||
|
||||
Reference in New Issue
Block a user