From 64bdaa46fb399ac40f1ccc4dc86aab447153e3db Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 23 May 2024 20:44:05 +0200 Subject: [PATCH] lib/curl/Init: use std::scoped_lock with implicit template parameter --- src/lib/curl/Init.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/curl/Init.cxx b/src/lib/curl/Init.cxx index 7f182256b..9a51fc7ff 100644 --- a/src/lib/curl/Init.cxx +++ b/src/lib/curl/Init.cxx @@ -15,7 +15,7 @@ CurlGlobal *CurlInit::instance; CurlInit::CurlInit(EventLoop &event_loop) { - const std::scoped_lock protect(mutex); + const std::scoped_lock protect{mutex}; if (++ref > 1) { assert(&event_loop == &instance->GetEventLoop()); return; @@ -31,7 +31,7 @@ CurlInit::CurlInit(EventLoop &event_loop) CurlInit::~CurlInit() noexcept { - const std::scoped_lock protect(mutex); + const std::scoped_lock protect{mutex}; if (--ref > 0) return;