Fix a large number of cases where we copy construct a shared_ptr just to destroy it.

This commit is contained in:
JoelKatz
2012-08-15 04:01:22 -07:00
parent 11f7012d09
commit abf41dd4de
10 changed files with 41 additions and 46 deletions

View File

@@ -17,7 +17,7 @@ class ValidationPair
public:
SerializedValidation::pointer oldest, newest;
ValidationPair(SerializedValidation::pointer v) : newest(v) { ; }
ValidationPair(const SerializedValidation::pointer& v) : newest(v) { ; }
};
class ValidationCollection
@@ -38,7 +38,7 @@ protected:
public:
ValidationCollection() : mWriting(false) { ; }
bool addValidation(SerializedValidation::pointer&);
bool addValidation(const SerializedValidation::pointer&);
ValidationSet getValidations(const uint256& ledger);
void getValidationCount(const uint256& ledger, bool currentOnly, int& trusted, int& untrusted);