0
0
Fork 0
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:
Jason Volk 2020-05-18 17:56:28 -07:00
parent 081e4eb567
commit 92a4322f3a

View file

@ -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;