| 2034 | } |
| 2035 | |
| 2036 | Array::index_t Array::ParamToZeroIndex(ExprTokenType &aParam) |
| 2037 | { |
| 2038 | if (!TokenIsNumeric(aParam)) |
| 2039 | return -1; |
| 2040 | auto index = TokenToInt64(aParam); |
| 2041 | if (index <= 0) // Let -1 be the last item and 0 be the first unused index. |
| 2042 | index += mLength + 1; |
| 2043 | --index; // Convert to zero-based. |
| 2044 | return index >= 0 && index <= MaxIndex ? UINT(index) : BadIndex; |
| 2045 | } |
| 2046 | |
| 2047 | |
| 2048 | ResultType Array::GetEnumItem(UINT &aIndex, Var *aVal, Var *aReserved, int aVarCount) |
nothing calls this directly
no test coverage detected