diff options
| author | hatal175 <hatal175@users.noreply.github.com> | 2025-12-09 23:44:27 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-09 13:44:27 -0800 |
| commit | cfded01caa7d70978e4d9e6806cd348755fc465a (patch) | |
| tree | 001badf61adf1242f3b8adcb28c9cb026ebfd4d9 /src/JSystem | |
| parent | 2447d5a02a7b2dc1f4caa4a87b1bddb9fd70c2b5 (diff) | |
Match resource.cpp with a small fake match (#2936)
Diffstat (limited to 'src/JSystem')
| -rw-r--r-- | src/JSystem/JMessage/resource.cpp | 19 | ||||
| -rw-r--r-- | src/JSystem/JStudio/JStudio/jstudio-control.cpp | 3 | ||||
| -rw-r--r-- | src/JSystem/JStudio/JStudio/stb.cpp | 4 |
3 files changed, 16 insertions, 10 deletions
diff --git a/src/JSystem/JMessage/resource.cpp b/src/JSystem/JMessage/resource.cpp index ff7500fdf2..2b1ddf7068 100644 --- a/src/JSystem/JMessage/resource.cpp +++ b/src/JSystem/JMessage/resource.cpp @@ -100,10 +100,8 @@ JMessage::TResourceContainer::TCResource::TCResource() {} JMessage::TResourceContainer::TCResource::~TCResource() { JGADGET_ASSERTWARN(173, empty()); } - -// NONMATCHING - likely due to incorrect enumerator setup compared to debug JMessage::TResource* JMessage::TResourceContainer::TCResource::Get_groupID(u16 u16GroupID) { - JGadget::TContainerEnumerator<TResource, 0> enumerator(this); + JGadget::TContainerEnumerator<TResourceContainer::TCResource> enumerator(*this); while (enumerator) { const TResource* res = &(*enumerator); if (res->getGroupID() == u16GroupID) @@ -117,9 +115,13 @@ JMessage::TResource* JMessage::TResourceContainer::TCResource::Do_create() { return new TResource(); } -// NONMATCHING extra null comparison void JMessage::TResourceContainer::TCResource::Do_destroy(JMessage::TResource* pResource) { + #if DEBUG delete pResource; + #else + // Fake Match - extra null comparison when not doing the conversion + delete (void*)pResource; + #endif } JMessage::TResourceContainer::TResourceContainer() : encodingType_(0), pfnParseCharacter_(NULL) {} @@ -141,14 +143,17 @@ void JMessage::TResourceContainer::setEncoding_(u8 e) { } JMessage::TParse::TParse(JMessage::TResourceContainer* pContainer) { + u8 sp8[5]; + JMessage::TResourceContainer* cont; JUT_ASSERT(324, pContainer!=NULL); - pContainer_ = pContainer; + cont = pContainer; + pContainer_ = cont; pResource_ = NULL; + sp8[0] = 0; } JMessage::TParse::~TParse() {} -// NONMATCHING regalloc, missing clrlwi bool JMessage::TParse::parseHeader_next(const void** ppData_inout, u32* puBlock_out, u32 param_2) { JUT_ASSERT(343, ppData_inout!=NULL); JUT_ASSERT(344, puBlock_out!=NULL); @@ -172,7 +177,7 @@ bool JMessage::TParse::parseHeader_next(const void** ppData_inout, u32* puBlock_ return false; } - u8 uEncoding = oHeader.get_encoding(); + const u8 uEncoding = oHeader.get_encoding(); if (uEncoding != 0) { if (!pContainer_->isEncodingSettable(uEncoding)) { JGADGET_WARNMSG(369, "encoding not acceptable"); diff --git a/src/JSystem/JStudio/JStudio/jstudio-control.cpp b/src/JSystem/JStudio/JStudio/jstudio-control.cpp index 0a9f83585b..b58fb20f0f 100644 --- a/src/JSystem/JStudio/JStudio/jstudio-control.cpp +++ b/src/JSystem/JStudio/JStudio/jstudio-control.cpp @@ -80,8 +80,9 @@ void JStudio::TFactory::appendCreateObject(JStudio::TCreateObject* param_0) { mList.Push_back(param_0); } + JStudio::TObject* JStudio::TFactory::create(JStudio::stb::data::TParse_TBlock_object const& param_0) { - JGadget::TContainerEnumerator<TCreateObject, -4> aTStack_368(&mList); + JGadget::TContainerEnumerator<JGadget::TLinkList<TCreateObject, -4> > aTStack_368(mList); while(aTStack_368) { TCreateObject& piVar1 = *aTStack_368; JStudio::TObject* obj; diff --git a/src/JSystem/JStudio/JStudio/stb.cpp b/src/JSystem/JStudio/JStudio/stb.cpp index b3e20a63f7..776f6c39f8 100644 --- a/src/JSystem/JStudio/JStudio/stb.cpp +++ b/src/JSystem/JStudio/JStudio/stb.cpp @@ -335,7 +335,7 @@ TObject* TControl::getObject(void const* param_0, u32 param_1) { void TControl::reset() { resetStatus_(); mObject_control.reset(NULL); - JGadget::TContainerEnumerator<JStudio::stb::TObject, -12> aTStack_18(&mObjectContainer); + JGadget::TContainerEnumerator<JGadget::TLinkList<JStudio::stb::TObject, -12> > aTStack_18(mObjectContainer); while (aTStack_18) { (*aTStack_18).reset(NULL); } @@ -346,7 +346,7 @@ bool TControl::forward(u32 param_0) { bool rv = mObject_control.forward(param_0); int uVar7 = 0xf; int uVar6 = 0; - JGadget::TContainerEnumerator<JStudio::stb::TObject, -12> aTStack_38(&mObjectContainer); + JGadget::TContainerEnumerator<JGadget::TLinkList<JStudio::stb::TObject, -12> > aTStack_38(mObjectContainer); while (aTStack_38) { JStudio::stb::TObject& this_00 = *aTStack_38; rv = this_00.forward(param_0) || rv; |
