From 6fc47fbb692b77a55637cf3d20525509a4faee30 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 29 Dec 2016 11:53:24 +0100 Subject: [PATCH] thread/Mutex: make ScopeLock an alias for std::unique_lock --- src/thread/Mutex.hxx | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/thread/Mutex.hxx b/src/thread/Mutex.hxx index 2f507f65d..39d3bd372 100644 --- a/src/thread/Mutex.hxx +++ b/src/thread/Mutex.hxx @@ -44,16 +44,7 @@ class Mutex : public PosixMutex {}; #endif -class ScopeLock { - std::unique_lock lock; - -public: - ScopeLock(Mutex &_mutex):lock(_mutex) {} - - void Unlock() { - lock.unlock(); - } -}; +using ScopeLock = std::unique_lock; /** * Within the scope of an instance, this class will keep a #Mutex