mirror of
https://github.com/matrix-construct/construct
synced 2024-11-25 16:22:35 +01:00
ircd::json: Assertions on iterator increments.
This commit is contained in:
parent
081e4eb567
commit
92a4322f3a
1 changed files with 4 additions and 1 deletions
|
@ -2401,7 +2401,6 @@ ircd::json::vector::const_iterator &
|
|||
ircd::json::vector::const_iterator::operator++()
|
||||
try
|
||||
{
|
||||
|
||||
this->state = {};
|
||||
string_view &state(this->state);
|
||||
qi::parse(start, stop, vector_next_parse, state);
|
||||
|
@ -2687,6 +2686,8 @@ ircd::json::object::const_iterator &
|
|||
ircd::json::object::const_iterator::operator++()
|
||||
try
|
||||
{
|
||||
assert(start != stop);
|
||||
|
||||
state = {};
|
||||
qi::parse(start, stop, object_next_parse, state);
|
||||
return *this;
|
||||
|
@ -3057,6 +3058,8 @@ ircd::json::array::const_iterator &
|
|||
ircd::json::array::const_iterator::operator++()
|
||||
try
|
||||
{
|
||||
assert(start != stop);
|
||||
|
||||
state = string_view{};
|
||||
qi::parse(start, stop, array_next_parse, state);
|
||||
return *this;
|
||||
|
|
Loading…
Reference in a new issue