Files
dusklight/src/SSystem/SComponent/c_tree_iter.cpp
T
Luke Street 4df8ccc871 Reorganize library code into libs/ (#3119)
* Reorganize files into libs/{dolphin,JSystem,PowerPC_EABI_Support,revolution,TRK_MINNOW_DOLPHIN}

* Update configure.py and project.py for new libs structure

* Refactor `#include <dolphin/x.h>` -> `<x.h>`

* Remove `__REVOLUTION_SDK__` forwards from dolphin

* Fix dolphin/ references in revolution

* Wrap `#include <dolphin.h>` in `!__REVOLUTION_SDK__`

* Always build TRK against dolphin headers

* Resolve revolution SDK header resolution issues
2026-03-01 14:35:36 -08:00

36 lines
853 B
C++

/**
* c_tree_iter.cpp
*
*/
#include "SSystem/SComponent/c_tree_iter.h"
#include "SSystem/SComponent/c_list.h"
#include "SSystem/SComponent/c_list_iter.h"
#include "SSystem/SComponent/c_tree.h"
#include <types.h>
int cTrIt_Method(node_lists_tree_class* tree, cNdIt_MethodFunc method, void* data) {
node_list_class* list = tree->mpLists;
int i = tree->mNumLists;
int ret = 1;
while (i-- > 0) {
if (cLsIt_Method(list++, method, data) == 0)
ret = 0;
}
return ret;
}
void* cTrIt_Judge(node_lists_tree_class* tree, cNdIt_JudgeFunc judge, void* data) {
node_list_class* list = tree->mpLists;
int i = tree->mNumLists;
void* pJudgeRet;
while (i-- > 0) {
pJudgeRet = cLsIt_Judge(list++, judge, data);
if (pJudgeRet != NULL)
return pJudgeRet;
}
return NULL;
}