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 Oct 30, 2024
1 parent 9b3b993 commit 9b654f7
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 @@ -310,10 +310,8 @@ do_str3:
return w.suspend(writer::state::str3);

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

do_utf1:
Expand Down

0 comments on commit 9b654f7

Please sign in to comment.