mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-22 23:48:12 -05:00
15 lines
322 B
C++
15 lines
322 B
C++
|
#include "mxautolocker.h"
|
||
|
|
||
|
MxAutoLocker::MxAutoLocker(MxCriticalSection *critsect)
|
||
|
{
|
||
|
this->m_criticalSection = critsect;
|
||
|
if (this->m_criticalSection != 0)
|
||
|
this->m_criticalSection->Enter();
|
||
|
}
|
||
|
|
||
|
MxAutoLocker::~MxAutoLocker()
|
||
|
{
|
||
|
if (this->m_criticalSection != 0)
|
||
|
this->m_criticalSection->Leave();
|
||
|
}
|