diff --git a/src/cpp/ripple/SHAMap.cpp b/src/cpp/ripple/SHAMap.cpp index 2e7c621bee..294cad85c7 100644 --- a/src/cpp/ripple/SHAMap.cpp +++ b/src/cpp/ripple/SHAMap.cpp @@ -141,13 +141,11 @@ void SHAMap::dirtyUp(std::stack& stack, const uint256& } } -static const SHAMapTreeNode::pointer no_node; - -SHAMapTreeNode::ref SHAMap::checkCacheNode(const SHAMapNode& iNode) +SHAMapTreeNode::pointer SHAMap::checkCacheNode(const SHAMapNode& iNode) { boost::unordered_map::iterator it = mTNByID.find(iNode); if (it == mTNByID.end()) - return no_node; + return SHAMapTreeNode::pointer(); it->second->touch(mSeq); return it->second; } @@ -175,7 +173,7 @@ SHAMapTreeNode::pointer SHAMap::walkTo(const uint256& id, bool modify) } } if (inNode->getTag() != id) - return no_node; + return SHAMapTreeNode::pointer(); if (modify) returnNode(inNode, true); return inNode; diff --git a/src/cpp/ripple/SHAMap.h b/src/cpp/ripple/SHAMap.h index ada464b016..5e2eb8d093 100644 --- a/src/cpp/ripple/SHAMap.h +++ b/src/cpp/ripple/SHAMap.h @@ -355,7 +355,7 @@ protected: std::stack getStack(const uint256& id, bool include_nonmatching_leaf, bool partialOk); SHAMapTreeNode::pointer walkTo(const uint256& id, bool modify); SHAMapTreeNode* walkToPointer(const uint256& id); - SHAMapTreeNode::ref checkCacheNode(const SHAMapNode&); + SHAMapTreeNode::pointer checkCacheNode(const SHAMapNode&); void returnNode(SHAMapTreeNode::pointer&, bool modify); void trackNewNode(SHAMapTreeNode::pointer&);