Fix a few more cases where we create a new shared pointer just to

immediately throw it away, resulting in a wasted
allocate/increment/decrement/free.
This commit is contained in:
JoelKatz
2012-08-19 19:04:18 -07:00
parent e825db5db9
commit 84ee39b147
13 changed files with 33 additions and 37 deletions

View File

@@ -91,7 +91,7 @@ bool SHAMap::walkBranch(SHAMapTreeNode* node, SHAMapItem::pointer otherMapItem,
return true;
}
bool SHAMap::compare(SHAMap::pointer otherMap, SHAMapDiff& differences, int maxCount)
bool SHAMap::compare(const SHAMap::pointer& otherMap, SHAMapDiff& differences, int maxCount)
{ // compare two hash trees, add up to maxCount differences to the difference table
// return value: true=complete table of differences given, false=too many differences
// throws on corrupt tables or missing nodes