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`.
This commit is contained in:
Vasil Dimov 2022-07-21 14:56:38 +02:00
parent 11c190e3f1
commit 9d7ae4b66c
No known key found for this signature in database
GPG Key ID: 54DF06F64B55CBBF
1 changed files with 4 additions and 2 deletions

View File

@ -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());