| 640 | } |
| 641 | |
| 642 | static GameValue ListResize(const GameState* state, GameValuePar oper1, GameValuePar oper2) |
| 643 | { |
| 644 | if (oper1.GetReadOnly()) |
| 645 | { |
| 646 | state->SetError(EvalBadVar); |
| 647 | return NOTHING; |
| 648 | } |
| 649 | const GameArrayType& array = oper1; |
| 650 | float index = oper2; |
| 651 | int sel = toInt(index); |
| 652 | GameArrayType& arrayNC = const_cast<GameArrayType&>(array); |
| 653 | arrayNC.Resize(sel); |
| 654 | return NOTHING; |
| 655 | } |
| 656 | |
| 657 | static bool CheckArrayInValue(const GameArrayType& array1, const GameValue& value) |
| 658 | { |
nothing calls this directly
no test coverage detected