mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-29 10:55:42 -05:00
14 lines
322 B
C++
14 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();
|
|
}
|