Move is_array management together with depth
This commit is contained in:
parent
e180dc44bc
commit
872127b722
|
@ -143,8 +143,8 @@ object_begin:
|
|||
log_start_value("object");
|
||||
depth++;
|
||||
if (depth >= dom_parser.max_depth()) { log_error("Exceeded max depth!"); return DEPTH_ERROR; }
|
||||
SIMDJSON_TRY( visitor.visit_object_start(*this) );
|
||||
dom_parser.is_array[depth] = false;
|
||||
SIMDJSON_TRY( visitor.visit_object_start(*this) );
|
||||
|
||||
{
|
||||
auto key = advance();
|
||||
|
@ -191,8 +191,8 @@ array_begin:
|
|||
log_start_value("array");
|
||||
depth++;
|
||||
if (depth >= dom_parser.max_depth()) { log_error("Exceeded max depth!"); return DEPTH_ERROR; }
|
||||
SIMDJSON_TRY( visitor.visit_array_start(*this) );
|
||||
dom_parser.is_array[depth] = true;
|
||||
SIMDJSON_TRY( visitor.visit_array_start(*this) );
|
||||
SIMDJSON_TRY( visitor.increment_count(*this) );
|
||||
|
||||
array_value:
|
||||
|
|
Loading…
Reference in New Issue