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:
MS
2024-03-12 10:23:50 -04:00
committed by GitHub
parent b0483000d8
commit e3d7188ec9
28 changed files with 127 additions and 125 deletions

View File

@@ -1,6 +1,6 @@
#include "mxramstreamcontroller.h"
#include "mxautolocker.h"
#include "mxautolock.h"
#include "mxdsstreamingaction.h"
#include "mxramstreamprovider.h"
@@ -9,7 +9,7 @@ DECOMP_SIZE_ASSERT(MxRAMStreamController, 0x98);
// FUNCTION: LEGO1 0x100c6110
MxResult MxRAMStreamController::Open(const char* p_filename)
{
MxAutoLocker lock(&m_criticalSection);
AUTOLOCK(m_criticalSection);
if (MxStreamController::Open(p_filename) != SUCCESS) {
return FAILURE;
}
@@ -37,7 +37,7 @@ MxResult MxRAMStreamController::Open(const char* p_filename)
// FUNCTION: LEGO1 0x100c6210
MxResult MxRAMStreamController::VTable0x20(MxDSAction* p_action)
{
MxAutoLocker lock(&m_criticalSection);
AUTOLOCK(m_criticalSection);
MxS32 unk0x24 = 0;
MxResult result = FAILURE;
@@ -81,7 +81,7 @@ MxResult MxRAMStreamController::VTable0x24(MxDSAction* p_action)
// FUNCTION: LEGO1 0x100c63c0
MxResult MxRAMStreamController::DeserializeObject(MxDSStreamingAction& p_action)
{
MxAutoLocker lock(&m_criticalSection);
AUTOLOCK(m_criticalSection);
MxResult result;
MxDSStreamingAction* value = NULL;