From 361fcfcae4bbc78251072ab5a67e31f97523c1f2 Mon Sep 17 00:00:00 2001 From: Lava Block <36247472+TheLavaBlock@users.noreply.github.com> Date: Sun, 29 Dec 2019 17:12:36 +0100 Subject: [PATCH] Fix C++17 shared_mutex compile error In C++17 the method is called: https://en.cppreference.com/w/cpp/thread/shared_mutex/try_lock_shared --- src/vk_mem_alloc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vk_mem_alloc.h b/src/vk_mem_alloc.h index f6c85be..7017014 100644 --- a/src/vk_mem_alloc.h +++ b/src/vk_mem_alloc.h @@ -3715,7 +3715,7 @@ void *aligned_alloc(size_t alignment, size_t size) public: void LockRead() { m_Mutex.lock_shared(); } void UnlockRead() { m_Mutex.unlock_shared(); } - bool TryLockRead() { return m_Mutex.try_shared_lock(); } + bool TryLockRead() { return m_Mutex.try_lock_shared(); } void LockWrite() { m_Mutex.lock(); } void UnlockWrite() { m_Mutex.unlock(); } bool TryLockWrite() { return m_Mutex.try_lock(); }