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

@@ -23,7 +23,7 @@ public:
LedgerEntryAction mAction;
int mSeq;
LedgerEntrySetEntry(SLE::pointer e, LedgerEntryAction a, int s) : mEntry(e), mAction(a), mSeq(s) { ; }
LedgerEntrySetEntry(const SLE::pointer& e, LedgerEntryAction a, int s) : mEntry(e), mAction(a), mSeq(s) { ; }
};
@@ -53,10 +53,10 @@ public:
// basic entry functions
SLE::pointer getEntry(const uint256& index, LedgerEntryAction&);
LedgerEntryAction hasEntry(const uint256& index) const;
void entryCache(SLE::pointer&); // Add this entry to the cache
void entryCreate(SLE::pointer&); // This entry will be created
void entryDelete(SLE::pointer&, bool unfunded);
void entryModify(SLE::pointer&); // This entry will be modified
void entryCache(const SLE::pointer&); // Add this entry to the cache
void entryCreate(const SLE::pointer&); // This entry will be created
void entryDelete(const SLE::pointer&, bool unfunded);
void entryModify(const SLE::pointer&); // This entry will be modified
Json::Value getJson(int) const;
void addRawMeta(Serializer&);