diff options
author | Vasil Dimov <vd@FreeBSD.org> | 2022-07-21 14:56:38 +0200 |
---|---|---|
committer | Vasil Dimov <vd@FreeBSD.org> | 2022-09-14 14:17:09 +0200 |
commit | 9d7ae4b66c9ce202d51286daac9be7e599d6a629 (patch) | |
tree | acb39e2361fd2d38d13a7aa319869938118ea10d /src/sync.h | |
parent | 11c190e3f18b43ecb120a5f3e81243fb6fd97261 (diff) | |
download | bitcoin-9d7ae4b66c9ce202d51286daac9be7e599d6a629.tar.xz |
sync: remove unused template parameter from ::UniqueLock
The template parameter `typename Base = typename Mutex::UniqueLock` is
not used, so remove it. Use internally defined type `Base` to avoid
repetitions of `Mutex::UniqueLock`.
Diffstat (limited to 'src/sync.h')
-rw-r--r-- | src/sync.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sync.h b/src/sync.h index 515e9d12fc..f6d9a6cbe5 100644 --- a/src/sync.h +++ b/src/sync.h @@ -148,10 +148,12 @@ inline void AssertLockNotHeldInline(const char* name, const char* file, int line #define AssertLockNotHeld(cs) AssertLockNotHeldInline(#cs, __FILE__, __LINE__, &cs) /** Wrapper around std::unique_lock style lock for Mutex. */ -template <typename Mutex, typename Base = typename Mutex::UniqueLock> -class SCOPED_LOCKABLE UniqueLock : public Base +template <typename Mutex> +class SCOPED_LOCKABLE UniqueLock : public Mutex::UniqueLock { private: + using Base = typename Mutex::UniqueLock; + void Enter(const char* pszName, const char* pszFile, int nLine) { EnterCritical(pszName, pszFile, nLine, Base::mutex()); |