mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Fix a large number of cases where we copy construct a shared_ptr just to destroy it.
This commit is contained in:
@@ -61,7 +61,7 @@ LedgerEntryAction LedgerEntrySet::hasEntry(const uint256& index) const
|
||||
return it->second.mAction;
|
||||
}
|
||||
|
||||
void LedgerEntrySet::entryCache(SLE::pointer& sle)
|
||||
void LedgerEntrySet::entryCache(const SLE::pointer& sle)
|
||||
{
|
||||
boost::unordered_map<uint256, LedgerEntrySetEntry>::iterator it = mEntries.find(sle->getIndex());
|
||||
if (it == mEntries.end())
|
||||
@@ -82,7 +82,7 @@ void LedgerEntrySet::entryCache(SLE::pointer& sle)
|
||||
}
|
||||
}
|
||||
|
||||
void LedgerEntrySet::entryCreate(SLE::pointer& sle)
|
||||
void LedgerEntrySet::entryCreate(const SLE::pointer& sle)
|
||||
{
|
||||
boost::unordered_map<uint256, LedgerEntrySetEntry>::iterator it = mEntries.find(sle->getIndex());
|
||||
if (it == mEntries.end())
|
||||
@@ -112,7 +112,7 @@ void LedgerEntrySet::entryCreate(SLE::pointer& sle)
|
||||
}
|
||||
}
|
||||
|
||||
void LedgerEntrySet::entryModify(SLE::pointer& sle)
|
||||
void LedgerEntrySet::entryModify(const SLE::pointer& sle)
|
||||
{
|
||||
boost::unordered_map<uint256, LedgerEntrySetEntry>::iterator it = mEntries.find(sle->getIndex());
|
||||
if (it == mEntries.end())
|
||||
@@ -147,7 +147,7 @@ void LedgerEntrySet::entryModify(SLE::pointer& sle)
|
||||
}
|
||||
}
|
||||
|
||||
void LedgerEntrySet::entryDelete(SLE::pointer& sle, bool unfunded)
|
||||
void LedgerEntrySet::entryDelete(const SLE::pointer& sle, bool unfunded)
|
||||
{
|
||||
boost::unordered_map<uint256, LedgerEntrySetEntry>::iterator it = mEntries.find(sle->getIndex());
|
||||
if (it == mEntries.end())
|
||||
|
||||
Reference in New Issue
Block a user