mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Tier0: fix DEBUG compile error
Only occurred in DEBUG as Assert otherwise gets compiled out, and CThreadSpinRWLock::m_iWriteDepth only exists when compiled with REENTRANT_THREAD_SPIN_RW_LOCK. The game does not feature this so this is not defined. Moved to the REENTRANT_THREAD_SPIN_RW_LOCK block to only check on this assert when this feature is enabled.
This commit is contained in:
parent
b290381804
commit
b1b80d3be0
@ -431,9 +431,10 @@ FORCEINLINE bool CThreadSpinRWLock::TryLockForWrite()
|
||||
if (!(curValue.m_i32 & 0x00010000) && ThreadInterlockedAssignIf((LONG*)&curValue.m_i32, 0x00010000, 0))
|
||||
{
|
||||
ThreadMemoryBarrier();
|
||||
Assert(m_iWriteDepth == 0 && m_writerId == 0);
|
||||
Assert(m_writerId == 0);
|
||||
m_writerId = ThreadGetCurrentId();
|
||||
#ifdef REENTRANT_THREAD_SPIN_RW_LOCK
|
||||
Assert(m_iWriteDepth == 0);
|
||||
m_iWriteDepth++;
|
||||
#endif
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user