mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-28 23:15:52 +00:00
Remove unused SHAMap::fetch
This commit is contained in:
committed by
Nik Bougalis
parent
bbe7457049
commit
05ac32064f
@@ -150,16 +150,6 @@ public:
|
|||||||
bool addGiveItem (std::shared_ptr<SHAMapItem const> const&,
|
bool addGiveItem (std::shared_ptr<SHAMapItem const> const&,
|
||||||
bool isTransaction, bool hasMeta);
|
bool isTransaction, bool hasMeta);
|
||||||
|
|
||||||
/** Fetch an item given its key.
|
|
||||||
This retrieves the item whose key matches.
|
|
||||||
If the item does not exist, an empty pointer is returned.
|
|
||||||
Exceptions:
|
|
||||||
Can throw SHAMapMissingNode
|
|
||||||
@note This can cause NodeStore reads
|
|
||||||
*/
|
|
||||||
std::shared_ptr<SHAMapItem const> const&
|
|
||||||
fetch (uint256 const& key) const;
|
|
||||||
|
|
||||||
// Save a copy if you need to extend the life
|
// Save a copy if you need to extend the life
|
||||||
// of the SHAMapItem beyond this SHAMap
|
// of the SHAMapItem beyond this SHAMap
|
||||||
std::shared_ptr<SHAMapItem const> const& peekItem (uint256 const& id) const;
|
std::shared_ptr<SHAMapItem const> const& peekItem (uint256 const& id) const;
|
||||||
|
|||||||
@@ -485,16 +485,6 @@ SHAMap::onlyBelow (SHAMapAbstractNode* node) const
|
|||||||
static std::shared_ptr<
|
static std::shared_ptr<
|
||||||
SHAMapItem const> const nullConstSHAMapItem;
|
SHAMapItem const> const nullConstSHAMapItem;
|
||||||
|
|
||||||
std::shared_ptr<SHAMapItem const> const&
|
|
||||||
SHAMap::fetch (uint256 const& key) const
|
|
||||||
{
|
|
||||||
SHAMapTreeNode const* const leaf =
|
|
||||||
walkToPointer(key);
|
|
||||||
if (! leaf)
|
|
||||||
return nullConstSHAMapItem;
|
|
||||||
return leaf->peekItem();
|
|
||||||
}
|
|
||||||
|
|
||||||
SHAMapItem const*
|
SHAMapItem const*
|
||||||
SHAMap::peekFirstItem(NodeStack& stack) const
|
SHAMap::peekFirstItem(NodeStack& stack) const
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user