Simplify agl::utl::IParameterObj::applyResParameterObj calls

This commit is contained in:
Léo Lam
2021-04-23 19:45:14 +02:00
parent 97e9bad1af
commit c6630576bb
11 changed files with 20 additions and 20 deletions
+2 -2
View File
@@ -28,7 +28,7 @@ bool Drop::parse_(u8* data, size_t, sead::Heap* heap) {
mTables[i].name.init("", name, "テーブル名", &mObj);
}
mObj.applyResParameterObj(header_obj, nullptr);
mObj.applyResParameterObj(header_obj);
for (s32 i = 0; i < num_tables; ++i) {
const auto obj = root.getResParameterObj(i + 1);
@@ -42,7 +42,7 @@ bool Drop::parse_(u8* data, size_t, sead::Heap* heap) {
addObj(&mTables[i].obj, mTables[i].name.ref());
applyResParameterArchive(agl::utl::ResParameterArchive{data});
mTables[i].obj.applyResParameterObj(obj, nullptr);
mTables[i].obj.applyResParameterObj(obj);
if (mTables[i].column_num.ref() > 0) {
mTables[i].items.allocBufferAssert(mTables[i].column_num.ref(), heap);
@@ -25,7 +25,7 @@ bool LifeCondition::parse_(u8* data, size_t, sead::Heap* heap) {
if (display_distance_obj.ptr()) {
mDisplayDistance.init(0.0, "Item", "表示距離", &mDisplayDistanceObj);
addObj(&mDisplayDistanceObj, "DisplayDistance");
mDisplayDistanceObj.applyResParameterObj(display_distance_obj, nullptr);
mDisplayDistanceObj.applyResParameterObj(display_distance_obj);
}
const auto auto_display_distance_algorithm_obj =
@@ -33,14 +33,14 @@ bool LifeCondition::parse_(u8* data, size_t, sead::Heap* heap) {
if (auto_display_distance_algorithm_obj.ptr()) {
mBoundingY.init("Bouding.Y", "Item", "自動距離算出アルゴリズム", &mBoundingYObj);
addObj(&mBoundingYObj, "AutoDisplayDistanceAlgorithm");
mBoundingYObj.applyResParameterObj(auto_display_distance_algorithm_obj, nullptr);
mBoundingYObj.applyResParameterObj(auto_display_distance_algorithm_obj);
}
const auto y_limit_algorithm_obj = agl::utl::getResParameterObj(root, "YLimitAlgorithm");
if (y_limit_algorithm_obj.ptr()) {
mYLimitAlgorithm.init("NoLimit", "Item", "Y制限アルゴリズム", &mYLimitAlgorithmObj);
addObj(&mYLimitAlgorithmObj, "YLimitAlgorithm");
mYLimitAlgorithmObj.applyResParameterObj(y_limit_algorithm_obj, nullptr);
mYLimitAlgorithmObj.applyResParameterObj(y_limit_algorithm_obj);
}
const auto delete_weathers_obj = agl::utl::getResParameterObj(root, "DeleteWeathers");
@@ -61,7 +61,7 @@ void LifeCondition::parseArray(const agl::utl::ResParameterObj* data, agl::utl::
const sead::SafeString& key, const sead::SafeString& desc,
sead::Heap* heap) {
addObj(obj, key);
obj->applyResParameterObj(*data, nullptr);
obj->applyResParameterObj(*data);
auto count = data->mPtr->getNumParameters();
if (count == 0)
@@ -76,7 +76,7 @@ void LifeCondition::parseArray(const agl::utl::ResParameterObj* data, agl::utl::
(*buffer)[i].init("", s, desc, obj);
}
obj->applyResParameterObj(*data, nullptr);
obj->applyResParameterObj(*data);
}
} // namespace ksys::res
@@ -28,7 +28,7 @@ bool Recipe::parse_(u8* data, size_t, sead::Heap* heap) {
mTables[i].name.init("", name, "テーブル名", &mObj);
}
mObj.applyResParameterObj(header_obj, nullptr);
mObj.applyResParameterObj(header_obj);
for (s32 i = 0; i < num_tables; ++i) {
const auto obj = root.getResParameterObj(i + 1);
@@ -36,7 +36,7 @@ bool Recipe::parse_(u8* data, size_t, sead::Heap* heap) {
addObj(&mTables[i].obj, mTables[i].name.ref());
applyResParameterArchive(agl::utl::ResParameterArchive{data});
mTables[i].obj.applyResParameterObj(obj, nullptr);
mTables[i].obj.applyResParameterObj(obj);
if (mTables[i].column_num.ref() > 0) {
mTables[i].items.allocBufferAssert(mTables[i].column_num.ref(), heap);
+2 -2
View File
@@ -27,7 +27,7 @@ bool Shop::parse_(u8* data, size_t, sead::Heap* heap) {
mTables[i].name.init("", name, "テーブル名", &mObj);
}
mObj.applyResParameterObj(header_obj, nullptr);
mObj.applyResParameterObj(header_obj);
for (s32 i = 0; i < num_tables; ++i) {
const auto obj = root.getResParameterObj(i + 1);
@@ -35,7 +35,7 @@ bool Shop::parse_(u8* data, size_t, sead::Heap* heap) {
addObj(&mTables[i].obj, mTables[i].name.ref());
applyResParameterArchive(agl::utl::ResParameterArchive{data});
mTables[i].obj.applyResParameterObj(obj, nullptr);
mTables[i].obj.applyResParameterObj(obj);
if (mTables[i].column_num.ref() > 0) {
mTables[i].items.allocBufferAssert(mTables[i].column_num.ref(), heap);