mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
x = y::pointer() -> x.reset()
This commit is contained in:
@@ -304,7 +304,7 @@ void ConnectionPool::connectTo(const std::string& strIp, int iPort)
|
||||
Peer::pointer ConnectionPool::peerConnect(const std::string& strIp, int iPort)
|
||||
{
|
||||
ipPort pipPeer = make_pair(strIp, iPort);
|
||||
Peer::pointer ppResult = Peer::pointer();
|
||||
Peer::pointer ppResult;
|
||||
|
||||
boost::unordered_map<ipPort, Peer::pointer>::iterator it;
|
||||
|
||||
@@ -545,7 +545,7 @@ void ConnectionPool::peerClosed(Peer::ref peer, const std::string& strIp, int iP
|
||||
{
|
||||
//cLog(lsINFO) << "Pool: Scan: scan fail: " << strIp << " " << iPort;
|
||||
|
||||
mScanning = Peer::pointer(); // No longer scanning.
|
||||
mScanning.reset(); // No longer scanning.
|
||||
bScanRefresh = true; // Look for more to scan.
|
||||
}
|
||||
|
||||
@@ -619,7 +619,7 @@ void ConnectionPool::peerVerified(Peer::ref peer)
|
||||
// XXX Check error.
|
||||
}
|
||||
|
||||
mScanning = Peer::pointer();
|
||||
mScanning.reset();
|
||||
|
||||
scanRefresh(); // Continue scanning.
|
||||
}
|
||||
|
||||
@@ -190,7 +190,8 @@ AccountState::pointer Ledger::getAccountState(const RippleAddress& accountID)
|
||||
}
|
||||
SerializedLedgerEntry::pointer sle =
|
||||
boost::make_shared<SerializedLedgerEntry>(item->peekSerializer(), item->getTag());
|
||||
if (sle->getType() != ltACCOUNT_ROOT) return AccountState::pointer();
|
||||
if (sle->getType() != ltACCOUNT_ROOT)
|
||||
return AccountState::pointer();
|
||||
return boost::make_shared<AccountState>(sle,accountID);
|
||||
}
|
||||
|
||||
@@ -308,7 +309,7 @@ bool Ledger::getTransaction(const uint256& txID, Transaction::pointer& txn, Tran
|
||||
if (type == SHAMapTreeNode::tnTRANSACTION_NM)
|
||||
{ // in tree with no metadata
|
||||
txn = theApp->getMasterTransaction().fetch(txID, false);
|
||||
meta = TransactionMetaSet::pointer();
|
||||
meta.reset();
|
||||
if (!txn)
|
||||
txn = Transaction::sharedTransaction(item->peekData(), true);
|
||||
}
|
||||
|
||||
@@ -407,7 +407,7 @@ bool LedgerAcquire::takeBase(const std::string& data)
|
||||
{
|
||||
cLog(lsWARNING) << "Acquire hash mismatch";
|
||||
cLog(lsWARNING) << mLedger->getHash() << "!=" << mHash;
|
||||
mLedger = Ledger::pointer();
|
||||
mLedger.reset();
|
||||
#ifdef TRUST_NETWORK
|
||||
assert(false);
|
||||
#endif
|
||||
|
||||
@@ -347,7 +347,7 @@ void LedgerConsensus::handleLCL(const uint256& lclHash)
|
||||
|
||||
cLog(lsINFO) << "Have the consensus ledger " << mPrevLedgerHash;
|
||||
mHaveCorrectLCL = true;
|
||||
mAcquiringLedger = LedgerAcquire::pointer();
|
||||
mAcquiringLedger.reset();
|
||||
theApp->getOPs().clearNeedNetworkLedger();
|
||||
mCloseResolution = ContinuousLedgerTiming::getNextLedgerTimeResolution(
|
||||
mPreviousLedger->getCloseResolution(), mPreviousLedger->getCloseAgree(),
|
||||
|
||||
@@ -103,7 +103,7 @@ void LedgerMaster::acquireMissingLedger(const uint256& ledgerHash, uint32 ledger
|
||||
Ledger::pointer lgr = mMissingLedger->getLedger();
|
||||
if (lgr && (lgr->getLedgerSeq() == ledgerSeq))
|
||||
missingAcquireComplete(mMissingLedger);
|
||||
mMissingLedger = LedgerAcquire::pointer();
|
||||
mMissingLedger.reset();
|
||||
return;
|
||||
}
|
||||
mMissingSeq = ledgerSeq;
|
||||
@@ -120,7 +120,7 @@ void LedgerMaster::missingAcquireComplete(LedgerAcquire::pointer acq)
|
||||
cLog(lsWARNING) << "Acquire failed for " << mMissingSeq;
|
||||
}
|
||||
|
||||
mMissingLedger = LedgerAcquire::pointer();
|
||||
mMissingLedger.reset();
|
||||
mMissingSeq = 0;
|
||||
|
||||
if (!acq->isFailed())
|
||||
@@ -147,7 +147,7 @@ void LedgerMaster::setFullLedger(Ledger::ref ledger)
|
||||
}
|
||||
|
||||
if (mMissingLedger && mMissingLedger->isComplete())
|
||||
mMissingLedger = LedgerAcquire::pointer();
|
||||
mMissingLedger.reset();
|
||||
|
||||
if (mMissingLedger || !theConfig.FULL_HISTORY)
|
||||
return;
|
||||
|
||||
@@ -106,7 +106,7 @@ Transaction::pointer NetworkOPs::submitTransaction(const Transaction::pointer& t
|
||||
|
||||
assert(false);
|
||||
|
||||
tpTransNew = Transaction::pointer();
|
||||
tpTransNew.reset();
|
||||
}
|
||||
|
||||
return tpTransNew;
|
||||
@@ -571,7 +571,7 @@ bool NetworkOPs::checkLastClosedLedger(const std::vector<Peer::pointer>& peerLis
|
||||
{
|
||||
mAcquiringLedger->abort();
|
||||
theApp->getMasterLedgerAcquire().dropLedger(mAcquiringLedger->getHash());
|
||||
mAcquiringLedger = LedgerAcquire::pointer();
|
||||
mAcquiringLedger.reset();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ void Peer::handle_write(const boost::system::error_code& error, size_t bytes_tra
|
||||
// std::cerr << "Peer::handle_write bytes: "<< bytes_transferred << std::endl;
|
||||
#endif
|
||||
|
||||
mSendingPacket = PackedMessage::pointer();
|
||||
mSendingPacket.reset();
|
||||
|
||||
if (mDetaching)
|
||||
{
|
||||
|
||||
@@ -73,7 +73,7 @@ bool SHAMap::walkBranch(SHAMapTreeNode* node, SHAMapItem::ref otherMapItem, bool
|
||||
else differences.insert(std::make_pair(otherMapItem->getTag(),
|
||||
std::make_pair(otherMapItem, item)));
|
||||
if(--maxCount <= 0) return false;
|
||||
item = SHAMapItem::pointer();
|
||||
item.reset();
|
||||
}
|
||||
}
|
||||
else assert(false);
|
||||
|
||||
@@ -500,7 +500,7 @@ int SHAMapTreeNode::getBranchCount() const
|
||||
|
||||
void SHAMapTreeNode::makeInner()
|
||||
{
|
||||
mItem = SHAMapItem::pointer();
|
||||
mItem.reset();
|
||||
memset(mHashes, 0, sizeof(mHashes));
|
||||
mType = tnINNER;
|
||||
mHash.zero();
|
||||
|
||||
@@ -481,7 +481,7 @@ TER TransactionEngine::applyTransaction(const SerializedTransaction& txn, Transa
|
||||
}
|
||||
}
|
||||
|
||||
mTxnAccount = SLE::pointer();
|
||||
mTxnAccount.reset();
|
||||
mNodes.clear();
|
||||
|
||||
if (!isSetBit(params, tapOPEN_LEDGER)
|
||||
|
||||
@@ -184,7 +184,7 @@ ValidationCollection::getCurrentValidations(uint256 currentLedger)
|
||||
else if (it->second->getSignTime() < cutoff)
|
||||
{ // contains a stale record
|
||||
mStaleValidations.push_back(it->second);
|
||||
it->second = SerializedValidation::pointer();
|
||||
it->second.reset();
|
||||
condWrite();
|
||||
it = mCurrentValidations.erase(it);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user