*: use std::scoped_lock with implicit template parameter
This commit is contained in:
@@ -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())
|
||||
|
Reference in New Issue
Block a user