*: use std::scoped_lock with implicit template parameter

This commit is contained in:
Max Kellermann
2024-05-23 20:43:31 +02:00
parent 4fc3230fe6
commit 381215fd73
68 changed files with 253 additions and 253 deletions

View File

@@ -266,7 +266,7 @@ CurlInputStream::OnHeaders(unsigned status,
FmtBuffer<40>("got HTTP status {}",
status).c_str());
const std::scoped_lock<Mutex> protect(mutex);
const std::scoped_lock protect{mutex};
if (IsSeekPending()) {
/* don't update metadata while seeking */
@@ -329,7 +329,7 @@ CurlInputStream::OnData(std::span<const std::byte> data)
{
assert(!data.empty());
const std::scoped_lock<Mutex> protect(mutex);
const std::scoped_lock protect{mutex};
if (IsSeekPending())
SeekDone();
@@ -345,7 +345,7 @@ CurlInputStream::OnData(std::span<const std::byte> data)
void
CurlInputStream::OnEnd()
{
const std::scoped_lock<Mutex> protect(mutex);
const std::scoped_lock protect{mutex};
InvokeOnAvailable();
AsyncInputStream::SetClosed();
@@ -354,7 +354,7 @@ CurlInputStream::OnEnd()
void
CurlInputStream::OnError(std::exception_ptr e) noexcept
{
const std::scoped_lock<Mutex> protect(mutex);
const std::scoped_lock protect{mutex};
postponed_exception = std::move(e);
if (IsSeekPending())