fix TEnumerator (#1192)

This commit is contained in:
Jcw87
2026-08-31 09:37:06 -07:00
committed by GitHub
parent e9f0482395
commit 18e0b77903
6 changed files with 69 additions and 56 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ JMessage::TResourceContainer::TResourceContainer() {
/* 8029FD04-8029FD90 .text Get_groupID__Q28JMessage18TResourceContainerFUs */
JMessage::TResource* JMessage::TResourceContainer::Get_groupID(u16 groupID) {
JGadget::TContainerEnumerator<TResource, 0> enumerator(this);
JGadget::TContainerEnumerator<TResourceContainer> enumerator(*this);
while (enumerator) {
const TResource* res = &(*enumerator);
if (res->mInfo.get_groupID() == groupID)
+5 -12
View File
@@ -332,17 +332,10 @@ f64 TFunctionValue_composite::composite_index(const JGadget::TVector_pointer<TFu
return pFront->getValue(param_3);
}
// TODO: remove when TContainerEnumerator_const is generic enough
template <typename T>
struct TContainerEnumerator_const_TVector : public JGadget::TEnumerator<const T*> {
inline TContainerEnumerator_const_TVector(JGadget::TVector_pointer<T> const& param_1)
: JGadget::TEnumerator<const T*>(param_1.begin(), param_1.end()) {}
};
/* 80271A04-80271A70 .text composite_parameter__Q27JStudio24TFunctionValue_compositeFRCQ27JGadget44TVector_pointer<PQ27JStudio14TFunctionValue>RCQ37JStudio24TFunctionValue_composite5TDatad */
f64 TFunctionValue_composite::composite_parameter(const JGadget::TVector_pointer<TFunctionValue*>& param_1, const TFunctionValue_composite::TData& param_2, f64 param_3) {
f64 dVar4 = param_3 - param_2.get_value();
TContainerEnumerator_const_TVector<TFunctionValue*> aTStack_18(param_1);
JGadget::TContainerEnumerator_const<JGadget::TVector_pointer<TFunctionValue*> > aTStack_18(param_1);
while (aTStack_18) {
TFunctionValue* const* ppiVar3 = *aTStack_18;
TFunctionValue* piVar3 = *ppiVar3;
@@ -354,7 +347,7 @@ f64 TFunctionValue_composite::composite_parameter(const JGadget::TVector_pointer
/* 80271A70-80271AF8 .text composite_add__Q27JStudio24TFunctionValue_compositeFRCQ27JGadget44TVector_pointer<PQ27JStudio14TFunctionValue>RCQ37JStudio24TFunctionValue_composite5TDatad */
f64 TFunctionValue_composite::composite_add(const JGadget::TVector_pointer<TFunctionValue*>& param_1, const TFunctionValue_composite::TData& param_2, f64 param_3) {
f64 dVar4 = param_2.get_value();
TContainerEnumerator_const_TVector<TFunctionValue*> aTStack_18(param_1);
JGadget::TContainerEnumerator_const<JGadget::TVector_pointer<TFunctionValue*> > aTStack_18(param_1);
while (aTStack_18) {
TFunctionValue* const* ppiVar3 = *aTStack_18;
TFunctionValue* piVar3 = *ppiVar3;
@@ -369,7 +362,7 @@ f64 TFunctionValue_composite::composite_subtract(const JGadget::TVector_pointer<
if (size == 0) {
return 0.0;
}
TContainerEnumerator_const_TVector<TFunctionValue*> aTStack_18(param_1);
JGadget::TContainerEnumerator_const<JGadget::TVector_pointer<TFunctionValue*> > aTStack_18(param_1);
TFunctionValue* const* local_148 = *aTStack_18;
TFunctionValue* pFront = *local_148;
// JUT_ASSERT(688, pFront!=0);
@@ -386,7 +379,7 @@ f64 TFunctionValue_composite::composite_subtract(const JGadget::TVector_pointer<
/* 80271BE8-80271C70 .text composite_multiply__Q27JStudio24TFunctionValue_compositeFRCQ27JGadget44TVector_pointer<PQ27JStudio14TFunctionValue>RCQ37JStudio24TFunctionValue_composite5TDatad */
f64 TFunctionValue_composite::composite_multiply(const JGadget::TVector_pointer<TFunctionValue*>& param_1, const TFunctionValue_composite::TData& param_2, f64 param_3) {
f64 dVar4 = param_2.get_value();
TContainerEnumerator_const_TVector<TFunctionValue*> aTStack_18(param_1);
JGadget::TContainerEnumerator_const<JGadget::TVector_pointer<TFunctionValue*> > aTStack_18(param_1);
while (aTStack_18) {
TFunctionValue* const* ppiVar3 = *aTStack_18;
TFunctionValue* piVar3 = *ppiVar3;
@@ -401,7 +394,7 @@ f64 TFunctionValue_composite::composite_divide(const JGadget::TVector_pointer<TF
if (size == 0) {
return 0.0;
}
TContainerEnumerator_const_TVector<TFunctionValue*> aTStack_18(param_1);
JGadget::TContainerEnumerator_const<JGadget::TVector_pointer<TFunctionValue*> > aTStack_18(param_1);
TFunctionValue* const* local_148 = *aTStack_18;
TFunctionValue* pFront = *local_148;
// JUT_ASSERT(724, pFront!=0);
@@ -52,7 +52,7 @@ void JStudio::TFactory::appendCreateObject(JStudio::TCreateObject* param_0) {
/* 8026E360-8026E438 .text create__Q27JStudio8TFactoryFRCQ47JStudio3stb4data20TParse_TBlock_object */
JStudio::TObject* JStudio::TFactory::create(const JStudio::stb::data::TParse_TBlock_object& 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 = NULL;
+1 -1
View File
@@ -299,7 +299,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> enumerator(&mObjectContainer);
JGadget::TContainerEnumerator<JGadget::TLinkList<JStudio::stb::TObject, -12> > enumerator(mObjectContainer);
while (enumerator) {
JStudio::stb::TObject& object = *enumerator;
rv = object.forward(param_0) || rv;