Skip to content

Commit 4956f1a

Browse files
committed
remove unnecessary branch in string serialization
1 parent b7166f6 commit 4956f1a

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
@@ -352,10 +352,8 @@ do_str3:
352352
return suspend(state::str3);
353353

354354
do_esc1:
355-
if(BOOST_JSON_LIKELY(ss))
356-
ss.append(buf_[0]);
357-
else
358-
return suspend(state::esc1);
355+
BOOST_ASSERT(ss);
356+
ss.append(buf_[0]);
359357
goto do_str3;
360358

361359
do_utf1:

0 commit comments

Comments
 (0)