Skip to content

Commit

Permalink
remove unnecessary branch in string serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
grisumbras committed Aug 12, 2024
1 parent 6714502 commit 4aa6a5b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions include/boost/json/impl/serializer.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -352,10 +352,8 @@ do_str3:
return suspend(state::str3);

do_esc1:
if(BOOST_JSON_LIKELY(ss))
ss.append(buf_[0]);
else
return suspend(state::esc1);
BOOST_ASSERT(ss);
ss.append(buf_[0]);
goto do_str3;

do_utf1:
Expand Down

0 comments on commit 4aa6a5b

Please sign in to comment.