MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / ListIsIn

Function ListIsIn

engine/Evaluator/express.cpp:1067–1079  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1065}
1066
1067static GameValue ListIsIn(const GameState* state, GameValuePar oper1, GameValuePar oper2)
1068{
1069 const GameArrayType& array = oper2;
1070 for (int i = 0; i < array.Size(); i++)
1071 {
1072 const GameValue& val = array[i];
1073 if (val.IsEqualTo(oper1))
1074 {
1075 return true;
1076 }
1077 }
1078 return false;
1079}
1080
1081static GameValue ListFind(const GameState* state, GameValuePar oper1, GameValuePar oper2)
1082{

Callers

nothing calls this directly

Calls 2

SizeMethod · 0.45
IsEqualToMethod · 0.45

Tested by

no test coverage detected