Skip to content

Commit 6c2426f

Browse files
committed
keep using lock_guard
1 parent 6f4ab59 commit 6c2426f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/libprojectM/Renderer/PlatformGLResolver.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ void GLResolver::SetBackendDefault()
5050

5151
auto GLResolver::Initialize(UserResolver resolver, void* userData) -> bool
5252
{
53-
const std::scoped_lock<std::mutex> lock(m_mutex);
53+
const std::lock_guard<std::mutex> lock(m_mutex);
5454

5555
if (m_loaded)
5656
{
@@ -88,7 +88,7 @@ auto GLResolver::Initialize(UserResolver resolver, void* userData) -> bool
8888

8989
void GLResolver::Shutdown()
9090
{
91-
const std::scoped_lock<std::mutex> lock(m_mutex);
91+
const std::lock_guard<std::mutex> lock(m_mutex);
9292

9393
m_loaded = false;
9494
m_backend = Backend::None;
@@ -106,13 +106,13 @@ void GLResolver::Shutdown()
106106

107107
auto GLResolver::IsLoaded() const -> bool
108108
{
109-
const std::scoped_lock<std::mutex> lock(m_mutex);
109+
const std::lock_guard<std::mutex> lock(m_mutex);
110110
return m_loaded;
111111
}
112112

113113
auto GLResolver::CurrentBackend() const -> Backend
114114
{
115-
const std::scoped_lock<std::mutex> lock(m_mutex);
115+
const std::lock_guard<std::mutex> lock(m_mutex);
116116
return m_backend;
117117
}
118118

0 commit comments

Comments
 (0)