mirror of
https://github.com/zeldaret/tp
synced 2026-05-23 23:05:36 -04:00
80ba3d9fd2
* checkpoint * checkpoint * rename f_pc * checkpoint * small symbol rename and fix some fpc symbols * remove unneeded entries from ldscript * simplify ok check, update docker container Co-authored-by: Pheenoh <pheenoh@gmail.com>
36 lines
882 B
C++
36 lines
882 B
C++
|
|
#include "SComponent/c_node_iter.h"
|
|
#include "global.h"
|
|
|
|
#define NODE_GET_PREV(pNode) (pNode ? pNode->mpPrevNode : NULL)
|
|
#define NODE_GET_NEXT(pNode) (pNode ? pNode->mpNextNode : NULL)
|
|
|
|
int cNdIt_Method(node_class* pNode, cNdIt_MethodFunc pMethod, void* pUserData) {
|
|
int ret = 1;
|
|
node_class* pNext = NODE_GET_NEXT(pNode);
|
|
|
|
while (pNode) {
|
|
int methodRet = pMethod(pNode, pUserData);
|
|
if (!methodRet)
|
|
ret = 0;
|
|
pNode = pNext;
|
|
pNext = NODE_GET_NEXT(pNext);
|
|
}
|
|
|
|
return ret;
|
|
}
|
|
|
|
void* cNdIt_Judge(node_class* pNode, cNdIt_JudgeFunc pJudge, void* pUserData) {
|
|
node_class* pNext = NODE_GET_NEXT(pNode);
|
|
|
|
while (pNode) {
|
|
void* pJudgeRet = pJudge(pNode, pUserData);
|
|
if (pJudgeRet != NULL)
|
|
return pJudgeRet;
|
|
pNode = pNext;
|
|
pNext = NODE_GET_NEXT(pNext);
|
|
}
|
|
|
|
return NULL;
|
|
}
|