| 1366 | } |
| 1367 | |
| 1368 | Value ValueIteratorBase::key() const { |
| 1369 | #ifndef JSON_VALUE_USE_INTERNAL_MAP |
| 1370 | const Value::CZString czstring = (*current_).first; |
| 1371 | if (czstring.c_str()) { |
| 1372 | if (czstring.isStaticString()) |
| 1373 | return Value(StaticString(czstring.c_str())); |
| 1374 | return Value(czstring.c_str()); |
| 1375 | } |
| 1376 | return Value(czstring.index()); |
| 1377 | #else |
| 1378 | if (isArray_) |
| 1379 | return Value(ValueInternalArray::indexOf(iterator_.array_)); |
| 1380 | bool isStatic; |
| 1381 | const char* memberName = ValueInternalMap::key(iterator_.map_, isStatic); |
| 1382 | if (isStatic) |
| 1383 | return Value(StaticString(memberName)); |
| 1384 | return Value(memberName); |
| 1385 | #endif |
| 1386 | } |
| 1387 | |
| 1388 | UInt ValueIteratorBase::index() const { |
| 1389 | #ifndef JSON_VALUE_USE_INTERNAL_MAP |
no test coverage detected