Files
dusklight/src/SSystem/SComponent/c_tree_iter.cpp
T
TakaRikka dfa8efa97b project cleanup (#2895)
* some wii OS fixes

* remove old dol2asm comments

* remove dol2asm.h

* remove function address comments

* normalize ATTRIBUTE_ALIGN usage

* DECL_WEAK macro

* fix gcc attribute weak macro

* wrap more mwcc specific things in ifdefs

* fixes

* fix revo sdk version flags

* fixes
2025-11-30 15:23:42 -07:00

36 lines
861 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 <dolphin/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;
}