| 2046 | |
| 2047 | |
| 2048 | ResultType Array::GetEnumItem(UINT &aIndex, Var *aVal, Var *aReserved, int aVarCount) |
| 2049 | { |
| 2050 | if (aIndex < mLength) |
| 2051 | { |
| 2052 | if (aVarCount > 1) |
| 2053 | { |
| 2054 | // Put the index first, only when there are two parameters. |
| 2055 | if (aVal) |
| 2056 | aVal->Assign((__int64)aIndex + 1); |
| 2057 | aVal = aReserved; |
| 2058 | } |
| 2059 | if (aVal) |
| 2060 | { |
| 2061 | auto &item = mItem[aIndex]; |
| 2062 | switch (item.symbol) |
| 2063 | { |
| 2064 | default: |
| 2065 | aVal->AssignString(item.string, item.string.Length()); |
| 2066 | if (item.symbol == SYM_MISSING) |
| 2067 | aVal->MarkUninitialized(); |
| 2068 | break; |
| 2069 | case SYM_INTEGER: aVal->Assign(item.n_int64); break; |
| 2070 | case SYM_FLOAT: aVal->Assign(item.n_double); break; |
| 2071 | case SYM_OBJECT: aVal->Assign(item.object); break; |
| 2072 | } |
| 2073 | } |
| 2074 | return CONDITION_TRUE; |
| 2075 | } |
| 2076 | return CONDITION_FALSE; |
| 2077 | } |
| 2078 | |
| 2079 | |
| 2080 |
nothing calls this directly
no test coverage detected