Skip to content

Commit 9b654f7

Browse files
committed
remove unnecessary branch in string serialization
1 parent 9b3b993 commit 9b654f7

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

include/boost/json/impl/serializer.ipp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -310,10 +310,8 @@ do_str3:
310310
return w.suspend(writer::state::str3);
311311

312312
do_esc1:
313-
if(BOOST_JSON_LIKELY(ss))
314-
ss.append(w.buf_[0]);
315-
else
316-
return w.suspend(writer::state::esc1);
313+
BOOST_ASSERT(ss);
314+
ss.append(w.buf_[0]);
317315
goto do_str3;
318316

319317
do_utf1:

0 commit comments

Comments
 (0)