Add comments on confusing "simdjson_unused"
This commit is contained in:
parent
bcab8d3abf
commit
cdb607f202
|
@ -46,6 +46,8 @@ simdjson_really_inline array::array(const value_iterator &_iter) noexcept
|
|||
}
|
||||
|
||||
simdjson_really_inline simdjson_result<array> array::start(value_iterator &iter) noexcept {
|
||||
// We don't need to know if the array is empty to start iteration, but we do want to know if there
|
||||
// is an error--thus `simdjson_unused`.
|
||||
simdjson_unused bool has_value;
|
||||
SIMDJSON_TRY( iter.start_array().get(has_value) );
|
||||
return array(iter);
|
||||
|
|
|
@ -34,6 +34,8 @@ simdjson_really_inline simdjson_result<value> object::find_field(const std::stri
|
|||
}
|
||||
|
||||
simdjson_really_inline simdjson_result<object> object::start(value_iterator &iter) noexcept {
|
||||
// We don't need to know if the object is empty to start iteration, but we do want to know if there
|
||||
// is an error--thus `simdjson_unused`.
|
||||
simdjson_unused bool has_value;
|
||||
SIMDJSON_TRY( iter.start_object().get(has_value) );
|
||||
return object(iter);
|
||||
|
|
Loading…
Reference in New Issue