From 05ac32064f6a088d04297f9c17ac87270866ebe2 Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Wed, 9 Dec 2015 16:02:58 -0500 Subject: [PATCH] Remove unused SHAMap::fetch --- src/ripple/shamap/SHAMap.h | 10 ---------- src/ripple/shamap/impl/SHAMap.cpp | 10 ---------- 2 files changed, 20 deletions(-) diff --git a/src/ripple/shamap/SHAMap.h b/src/ripple/shamap/SHAMap.h index b6e0d83e3..d9fa3c046 100644 --- a/src/ripple/shamap/SHAMap.h +++ b/src/ripple/shamap/SHAMap.h @@ -150,16 +150,6 @@ public: bool addGiveItem (std::shared_ptr const&, 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 const& - fetch (uint256 const& key) const; - // Save a copy if you need to extend the life // of the SHAMapItem beyond this SHAMap std::shared_ptr const& peekItem (uint256 const& id) const; diff --git a/src/ripple/shamap/impl/SHAMap.cpp b/src/ripple/shamap/impl/SHAMap.cpp index e8cd2e650..6d0ac8679 100644 --- a/src/ripple/shamap/impl/SHAMap.cpp +++ b/src/ripple/shamap/impl/SHAMap.cpp @@ -485,16 +485,6 @@ SHAMap::onlyBelow (SHAMapAbstractNode* node) const static std::shared_ptr< SHAMapItem const> const nullConstSHAMapItem; -std::shared_ptr const& -SHAMap::fetch (uint256 const& key) const -{ - SHAMapTreeNode const* const leaf = - walkToPointer(key); - if (! leaf) - return nullConstSHAMapItem; - return leaf->peekItem(); -} - SHAMapItem const* SHAMap::peekFirstItem(NodeStack& stack) const {