diff --git a/src/cpp/ripple/SHAMap.cpp b/src/cpp/ripple/SHAMap.cpp index bd9158e52d..ad536e7626 100644 --- a/src/cpp/ripple/SHAMap.cpp +++ b/src/cpp/ripple/SHAMap.cpp @@ -365,7 +365,7 @@ void SHAMap::eraseChildren(SHAMapTreeNode::pointer node) static const SHAMapItem::pointer no_item; -SHAMapItem::ref SHAMap::peekFirstItem() +SHAMapItem::pointer SHAMap::peekFirstItem() { boost::recursive_mutex::scoped_lock sl(mLock); SHAMapTreeNode *node = firstBelow(root.get()); @@ -374,7 +374,7 @@ SHAMapItem::ref SHAMap::peekFirstItem() return node->peekItem(); } -SHAMapItem::ref SHAMap::peekFirstItem(SHAMapTreeNode::TNType& type) +SHAMapItem::pointer SHAMap::peekFirstItem(SHAMapTreeNode::TNType& type) { boost::recursive_mutex::scoped_lock sl(mLock); SHAMapTreeNode *node = firstBelow(root.get()); @@ -384,7 +384,7 @@ SHAMapItem::ref SHAMap::peekFirstItem(SHAMapTreeNode::TNType& type) return node->peekItem(); } -SHAMapItem::ref SHAMap::peekLastItem() +SHAMapItem::pointer SHAMap::peekLastItem() { boost::recursive_mutex::scoped_lock sl(mLock); SHAMapTreeNode *node = lastBelow(root.get()); @@ -393,14 +393,14 @@ SHAMapItem::ref SHAMap::peekLastItem() return node->peekItem(); } -SHAMapItem::ref SHAMap::peekNextItem(const uint256& id) +SHAMapItem::pointer SHAMap::peekNextItem(const uint256& id) { SHAMapTreeNode::TNType type; return peekNextItem(id, type); } -SHAMapItem::ref SHAMap::peekNextItem(const uint256& id, SHAMapTreeNode::TNType& type) +SHAMapItem::pointer SHAMap::peekNextItem(const uint256& id, SHAMapTreeNode::TNType& type) { // Get a pointer to the next item in the tree after a given item - item must be in tree boost::recursive_mutex::scoped_lock sl(mLock); @@ -435,7 +435,7 @@ SHAMapItem::ref SHAMap::peekNextItem(const uint256& id, SHAMapTreeNode::TNType& return no_item; } -SHAMapItem::ref SHAMap::peekPrevItem(const uint256& id) +SHAMapItem::pointer SHAMap::peekPrevItem(const uint256& id) { // Get a pointer to the previous item in the tree after a given item - item must be in tree boost::recursive_mutex::scoped_lock sl(mLock); @@ -464,7 +464,7 @@ SHAMapItem::ref SHAMap::peekPrevItem(const uint256& id) return no_item; } -SHAMapItem::ref SHAMap::peekItem(const uint256& id) +SHAMapItem::pointer SHAMap::peekItem(const uint256& id) { boost::recursive_mutex::scoped_lock sl(mLock); SHAMapTreeNode* leaf = walkToPointer(id); @@ -473,7 +473,7 @@ SHAMapItem::ref SHAMap::peekItem(const uint256& id) return leaf->peekItem(); } -SHAMapItem::ref SHAMap::peekItem(const uint256& id, SHAMapTreeNode::TNType& type) +SHAMapItem::pointer SHAMap::peekItem(const uint256& id, SHAMapTreeNode::TNType& type) { boost::recursive_mutex::scoped_lock sl(mLock); SHAMapTreeNode* leaf = walkToPointer(id); diff --git a/src/cpp/ripple/SHAMap.h b/src/cpp/ripple/SHAMap.h index e641ed3a28..afd323fdd0 100644 --- a/src/cpp/ripple/SHAMap.h +++ b/src/cpp/ripple/SHAMap.h @@ -397,16 +397,16 @@ public: bool addGiveItem(SHAMapItem::ref, bool isTransaction, bool hasMeta); // save a copy if you only need a temporary - SHAMapItem::ref peekItem(const uint256& id); - SHAMapItem::ref peekItem(const uint256& id, SHAMapTreeNode::TNType& type); + SHAMapItem::pointer peekItem(const uint256& id); + SHAMapItem::pointer peekItem(const uint256& id, SHAMapTreeNode::TNType& type); // traverse functions - SHAMapItem::ref peekFirstItem(); - SHAMapItem::ref peekFirstItem(SHAMapTreeNode::TNType& type); - SHAMapItem::ref peekLastItem(); - SHAMapItem::ref peekNextItem(const uint256&); - SHAMapItem::ref peekNextItem(const uint256&, SHAMapTreeNode::TNType& type); - SHAMapItem::ref peekPrevItem(const uint256&); + SHAMapItem::pointer peekFirstItem(); + SHAMapItem::pointer peekFirstItem(SHAMapTreeNode::TNType& type); + SHAMapItem::pointer peekLastItem(); + SHAMapItem::pointer peekNextItem(const uint256&); + SHAMapItem::pointer peekNextItem(const uint256&, SHAMapTreeNode::TNType& type); + SHAMapItem::pointer peekPrevItem(const uint256&); // comparison/sync functions void getMissingNodes(std::vector& nodeIDs, std::vector& hashes, int max,