Fix lots of places I used 'empty' instead of 'clear'. This is why I like 'isEmpty'.

This commit is contained in:
JoelKatz
2012-10-11 05:06:24 -07:00
parent 4f1ebc2884
commit c43934ab6f
4 changed files with 7 additions and 7 deletions

View File

@@ -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());

View File

@@ -124,7 +124,7 @@ void LedgerAcquire::done()
setComplete();
mLock.lock();
triggers = mOnComplete;
mOnComplete.empty();
mOnComplete.clear();
mLock.unlock();
if (mLedger)

View File

@@ -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

View File

@@ -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;