Use standard C++ types instead of type aliases:

* Remove ripple::RippleMutex and ripple::RippleRecursiveMutex
  and use std::mutex and std::recursive_mutex respectively.
* Use std::lock_guard instead of std::unique_lock when the
  additional features of std::unique_lock are not needed.
This commit is contained in:
Nik Bougalis
2015-09-29 15:07:03 -07:00
committed by Vinnie Falco
parent 333ba69d60
commit f424ae6942
25 changed files with 100 additions and 158 deletions

View File

@@ -65,14 +65,13 @@ class LedgerMasterImp
: public LedgerMaster
{
public:
using LockType = RippleRecursiveMutex;
using ScopedLockType = std::lock_guard <LockType>;
using ScopedUnlockType = beast::GenericScopedUnlock <LockType>;
using ScopedLockType = std::lock_guard <std::recursive_mutex>;
using ScopedUnlockType = beast::GenericScopedUnlock <std::recursive_mutex>;
Application& app_;
beast::Journal m_journal;
LockType m_mutex;
std::recursive_mutex m_mutex;
// The ledger that most recently closed.
LedgerHolder mClosedLedger;
@@ -99,7 +98,7 @@ public:
// A set of transactions to replay during the next close
std::unique_ptr<LedgerReplay> replayData;
LockType mCompleteLock;
std::recursive_mutex mCompleteLock;
RangeSet mCompleteLedgers;
std::unique_ptr <LedgerCleaner> mLedgerCleaner;
@@ -1289,7 +1288,7 @@ public:
}
}
LockType& peekMutex () override
std::recursive_mutex& peekMutex () override
{
return m_mutex;
}