From 9d7ae4b66c9ce202d51286daac9be7e599d6a629 Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Thu, 21 Jul 2022 14:56:38 +0200 Subject: [PATCH] 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`. --- src/sync.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/sync.h b/src/sync.h index 515e9d12fc1..f6d9a6cbe50 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 -class SCOPED_LOCKABLE UniqueLock : public Base +template +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());