Skip to content

Commit

Permalink
Lock: fix incorrect lock flag setup.
Browse files Browse the repository at this point in the history
  • Loading branch information
nitrocaster committed Nov 15, 2015
1 parent e6a304f commit e6c0300
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/xrCore/Threading/Lock.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ class XRCORE_API Lock
#ifdef CONFIG_PROFILE_LOCKS
void Enter();
#else
void Enter() { return mutex.lock(); isLocked = true; }
void Enter()
{
mutex.lock();
isLocked = true;
}
#endif

bool TryEnter()
Expand All @@ -44,7 +48,11 @@ class XRCORE_API Lock
return locked;
}

void Leave() { return mutex.unlock(); isLocked = false; }
void Leave()
{
isLocked = false;
mutex.unlock();
}

bool IsLocked() const { return isLocked; }

Expand Down

0 comments on commit e6c0300

Please sign in to comment.