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

Function StringThen

engine/Evaluator/express.cpp:862–875  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

860}
861
862static GameValue StringThen(const GameState* state, GameValuePar oper1, GameValuePar oper2)
863{
864 bool test = oper1;
865 if (test)
866 {
867 GameVarSpace local(state->GetContext());
868 state->BeginContext(&local);
869 RString expression = oper2;
870 GameValue ret = state->EvaluateMultiple(expression);
871 state->EndContext();
872 return ret;
873 }
874 return NOTHING;
875}
876
877// if (cond) exitWith { code } — evaluates code when cond is true, stores the
878// value in tls_exitWithValue, and signals EvalBreak to stop further statement

Callers

nothing calls this directly

Calls 4

BeginContextMethod · 0.80
EvaluateMultipleMethod · 0.80
EndContextMethod · 0.80
GetContextMethod · 0.45

Tested by

no test coverage detected