From df36d656650198b3cbf140e2982752a95b3f2c6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Sun, 27 Feb 2022 12:48:28 +0100 Subject: Revert "Add #ifdef declarations for NON_MATCHING code" This reverts commit 42807160cfb33af9f3cf2fa6b0ba98f232208cdb. It makes searching for NON_MATCHING comment descriptions much less convenient in most text editors or IDEs, and we want the function CSV to be the single source of truth for function statuses. Having a function marked as matching but not built because of a stray #ifdef would be bad. --- src/KingSystem/ActorSystem/actAiClassDef.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/KingSystem/ActorSystem/actAiClassDef.cpp') diff --git a/src/KingSystem/ActorSystem/actAiClassDef.cpp b/src/KingSystem/ActorSystem/actAiClassDef.cpp index 064aa883..378d2248 100644 --- a/src/KingSystem/ActorSystem/actAiClassDef.cpp +++ b/src/KingSystem/ActorSystem/actAiClassDef.cpp @@ -42,8 +42,7 @@ void AIClassDef::init(const sead::SafeString& aidef_file_name, sead::Heap* heap) mData->load(heap); } -// not trying to match the heap sort. The rest should be equivalent -#ifdef NON_MATCHING +// NON_MATCHING: not trying to match the heap sort. The rest should be equivalent bool AIClassDef::Data::load(sead::Heap* heap) { root_iter.tryGetIterByKey(&iters[s32(AIDefType::AI)], str_AIs); root_iter.tryGetIterByKey(&iters[s32(AIDefType::Action)], str_Actions); @@ -83,7 +82,6 @@ bool AIClassDef::Data::load(sead::Heap* heap) { return true; } -#endif s32 AIClassDef::getRawDefIdx(const sead::SafeString& def_name, AIDefType type) const { const auto hash = sead::HashCRC32::calcStringHash(def_name); @@ -139,8 +137,7 @@ void AIClassDef::getDef(const sead::SafeString& class_name, AIDefSet* set, data->inst_params_key_idx[s32(AIDefInstParamKind::AITree)]); } -// CalcTiming ifs are reordered -#ifdef NON_MATCHING +// NON_MATCHING: CalcTiming ifs are reordered void AIClassDef::doGetDef(AIDef* def, const al::ByamlIter& iter, AIDefInstParamKind param_kind, AIDefType class_type, s32 key_idx) const { def->no_stop = false; @@ -262,7 +259,6 @@ void AIClassDef::doGetDef(AIDef* def, const al::ByamlIter& iter, AIDefInstParamK ++def->num_params; } } -#endif void AIClassDef::getDef(AIDef* def, const sead::SafeString& class_name, AIDefInstParamKind param_kind, AIDefType class_type) const { -- cgit v1.2.3