Update value_iterator-inl.h
This commit is contained in:
parent
c4a312e6c3
commit
a755203aee
|
@ -510,6 +510,7 @@ simdjson_really_inline bool value_iterator::is_at_container_start() const noexce
|
|||
return _json_iter->token.index == _start_position + 1;
|
||||
}
|
||||
simdjson_really_inline bool value_iterator::is_at_iterator_start() const noexcept {
|
||||
// We can legitimately be either at the first value ([1]), or after the array if it's empty ([]).
|
||||
auto delta = _json_iter->token.index - _start_position;
|
||||
return delta == 1 || delta == 2;
|
||||
}
|
||||
|
@ -567,4 +568,4 @@ simdjson_really_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value_
|
|||
simdjson_really_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value_iterator>::simdjson_result(error_code error) noexcept
|
||||
: implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::value_iterator>(error) {}
|
||||
|
||||
} // namespace simdjson
|
||||
} // namespace simdjson
|
||||
|
|
Loading…
Reference in New Issue