MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / find_call

Method find_call

ogsr_engine/xrGame/PHCommander.cpp:58–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56CPHCall* CPHCommander::add_call(CPHCondition* condition, CPHAction* action) { return m_calls.emplace_back(std::make_unique<CPHCall>(condition, action)).get(); }
57
58PHCALL_I CPHCommander::find_call(CPHReqComparerV* cmp_condition, CPHReqComparerV* cmp_action)
59{
60 return std::find_if(m_calls.begin(), m_calls.end(), [&](auto& call) { return !call->isNeedRemove() && call->equal(cmp_condition, cmp_action); });
61}
62
63bool CPHCommander::has_call(CPHReqComparerV* cmp_condition, CPHReqComparerV* cmp_action) { return find_call(cmp_condition, cmp_action) != m_calls.end(); }
64

Callers

nothing calls this directly

Calls 5

find_ifClass · 0.85
isNeedRemoveMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
equalMethod · 0.45

Tested by

no test coverage detected