[c++] replace std::lock_guard with std::scoped_lock

This commit is contained in:
Armin Novak
2025-12-03 15:06:03 +01:00
parent 98b80dcc65
commit 7ccb5994c0
7 changed files with 36 additions and 36 deletions

View File

@@ -103,7 +103,7 @@ class ChannelData
bool add(const std::string& name, WINPR_ATTR_UNUSED bool back)
{
std::lock_guard<std::mutex> guard(_mux);
std::scoped_lock guard(_mux);
if (_map.find(name) == _map.end())
{
WLog_INFO(TAG, "adding '%s' to dump list", name.c_str());
@@ -114,7 +114,7 @@ class ChannelData
std::ofstream stream(const std::string& name, bool back)
{
std::lock_guard<std::mutex> guard(_mux);
std::scoped_lock guard(_mux);
auto& atom = _map[name];
auto count = atom++;
auto path = filepath(name, back, count);