thread/Mutex: remove ScopeLock, use std::lock_guard directly

This commit is contained in:
Max Kellermann
2017-01-03 07:11:57 +01:00
parent a42021655c
commit 2e182e84c3
51 changed files with 158 additions and 160 deletions

View File

@@ -37,7 +37,7 @@ UpdateRemoveService::RunDeferred()
std::forward_list<std::string> copy;
{
const ScopeLock protect(mutex);
const std::lock_guard<Mutex> protect(mutex);
std::swap(uris, copy);
}
@@ -56,7 +56,7 @@ UpdateRemoveService::Remove(std::string &&uri)
bool was_empty;
{
const ScopeLock protect(mutex);
const std::lock_guard<Mutex> protect(mutex);
was_empty = uris.empty();
uris.emplace_front(std::move(uri));
}