Merge faa24a8f59 into 3113a52a7d
This commit is contained in:
commit
e4c289fb32
35
src/json.hpp
35
src/json.hpp
@ -3250,6 +3250,20 @@ class parser
|
||||
break; // LCOV_EXCL_LINE
|
||||
}
|
||||
|
||||
case token_type::uninitialized:
|
||||
|
||||
case token_type::end_array:
|
||||
|
||||
case token_type::end_object:
|
||||
|
||||
case token_type::name_separator:
|
||||
|
||||
case token_type::value_separator:
|
||||
|
||||
case token_type::end_of_input:
|
||||
|
||||
case token_type::literal_or_value:
|
||||
|
||||
default:
|
||||
{
|
||||
// the last token was unexpected; we expected a value
|
||||
@ -6298,6 +6312,11 @@ class serializer
|
||||
o->write_characters("null", 4);
|
||||
return;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -6563,7 +6582,7 @@ class serializer
|
||||
// check that the additional bytes are present
|
||||
assert(i + bytes < s.size());
|
||||
|
||||
// to use \uxxxx escaping, we first need to calculate
|
||||
// to use \uxxxx escaping, we first need to calculate
|
||||
// the codepoint from the UTF-8 bytes
|
||||
int codepoint = 0;
|
||||
|
||||
@ -8113,6 +8132,8 @@ class basic_json
|
||||
break;
|
||||
}
|
||||
|
||||
case value_t::discarded:
|
||||
|
||||
default:
|
||||
{
|
||||
object = nullptr; // silence warning, see #821
|
||||
@ -8189,6 +8210,18 @@ class basic_json
|
||||
break;
|
||||
}
|
||||
|
||||
case value_t::null:
|
||||
|
||||
case value_t::boolean:
|
||||
|
||||
case value_t::number_integer:
|
||||
|
||||
case value_t::number_unsigned:
|
||||
|
||||
case value_t::number_float:
|
||||
|
||||
case value_t::discarded:
|
||||
|
||||
default:
|
||||
{
|
||||
break;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user