mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 08:24:16 +00:00
Use AUTOLOCK macro (#660)
* Use AUTOLOCK macro * MxAutoLock * Remove semicolon Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com> --------- Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
This commit is contained in:
17
LEGO1/omni/include/mxautolock.h
Normal file
17
LEGO1/omni/include/mxautolock.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#ifndef MXAUTOLOCK_H
|
||||
#define MXAUTOLOCK_H
|
||||
|
||||
#include "mxcriticalsection.h"
|
||||
|
||||
#define AUTOLOCK(CS) MxAutoLock lock(&CS)
|
||||
|
||||
class MxAutoLock {
|
||||
public:
|
||||
MxAutoLock(MxCriticalSection* p_criticalSection);
|
||||
~MxAutoLock();
|
||||
|
||||
private:
|
||||
MxCriticalSection* m_criticalSection;
|
||||
};
|
||||
|
||||
#endif // MXAUTOLOCK_H
|
@@ -1,15 +0,0 @@
|
||||
#ifndef MXAUTOLOCKER_H
|
||||
#define MXAUTOLOCKER_H
|
||||
|
||||
#include "mxcriticalsection.h"
|
||||
|
||||
class MxAutoLocker {
|
||||
public:
|
||||
MxAutoLocker(MxCriticalSection* p_criticalSection);
|
||||
~MxAutoLocker();
|
||||
|
||||
private:
|
||||
MxCriticalSection* m_criticalSection;
|
||||
};
|
||||
|
||||
#endif // MXAUTOLOCKER_H
|
@@ -91,7 +91,7 @@ protected:
|
||||
MxTimer* m_timer; // 0x3c
|
||||
MxStreamer* m_streamer; // 0x40
|
||||
MxAtomIdCounterSet* m_atomIdCounterSet; // 0x44
|
||||
MxCriticalSection m_criticalsection; // 0x48
|
||||
MxCriticalSection m_criticalSection; // 0x48
|
||||
MxBool m_timerRunning; // 0x64
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user