Skip to content

Commit e6c0300

Browse files
author
nitrocaster
committed
Lock: fix incorrect lock flag setup.
1 parent e6a304f commit e6c0300

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/xrCore/Threading/Lock.hpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ class XRCORE_API Lock
3131
#ifdef CONFIG_PROFILE_LOCKS
3232
void Enter();
3333
#else
34-
void Enter() { return mutex.lock(); isLocked = true; }
34+
void Enter()
35+
{
36+
mutex.lock();
37+
isLocked = true;
38+
}
3539
#endif
3640

3741
bool TryEnter()
@@ -44,7 +48,11 @@ class XRCORE_API Lock
4448
return locked;
4549
}
4650

47-
void Leave() { return mutex.unlock(); isLocked = false; }
51+
void Leave()
52+
{
53+
isLocked = false;
54+
mutex.unlock();
55+
}
4856

4957
bool IsLocked() const { return isLocked; }
5058

0 commit comments

Comments
 (0)