Refactor treatment of Ledger:

All handling of Ledger in shared_ptr is modified to
use a const managed object when the context requires
immutable semantics.
This commit is contained in:
Nik Bougalis
2016-02-21 16:56:18 -05:00
parent 77a4218a9e
commit 34e85ccb62
50 changed files with 788 additions and 782 deletions

View File

@@ -241,11 +241,12 @@ SHAMapStoreImp::makeDatabase (std::string const& name,
}
void
SHAMapStoreImp::onLedgerClosed (Ledger::pointer validatedLedger)
SHAMapStoreImp::onLedgerClosed(
std::shared_ptr<Ledger const> const& ledger)
{
{
std::lock_guard <std::mutex> lock (mutex_);
newLedger_ = validatedLedger;
newLedger_ = ledger;
}
cond_.notify_one();
}