mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
VstdLib: change mutex type for CGaussianRandomStream
Needs to be CThreadMutex.
This commit is contained in:
parent
0a49d03589
commit
31eac6bcc4
@ -186,7 +186,7 @@ CGaussianRandomStream::CGaussianRandomStream(IUniformRandomStream* pUniformStrea
|
||||
//-----------------------------------------------------------------------------
|
||||
void CGaussianRandomStream::AttachToStream(IUniformRandomStream* pUniformStream)
|
||||
{
|
||||
std::lock_guard<std::mutex> l(m_mutex);
|
||||
AUTO_LOCK( m_mutex );
|
||||
|
||||
m_pUniformStream = pUniformStream;
|
||||
m_bHaveValue = false;
|
||||
@ -198,7 +198,7 @@ void CGaussianRandomStream::AttachToStream(IUniformRandomStream* pUniformStream)
|
||||
//-----------------------------------------------------------------------------
|
||||
float CGaussianRandomStream::RandomFloat(float flMean, float flStdDev)
|
||||
{
|
||||
std::lock_guard<std::mutex> l(m_mutex);
|
||||
AUTO_LOCK( m_mutex );
|
||||
|
||||
IUniformRandomStream* pUniformStream = m_pUniformStream ? m_pUniformStream : s_pUniformStream;
|
||||
float fac, rsq, v1, v2;
|
||||
|
@ -85,7 +85,7 @@ private:
|
||||
bool m_bHaveValue;
|
||||
float m_flRandomValue;
|
||||
|
||||
std::mutex m_mutex;
|
||||
CThreadMutex m_mutex;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user