From fb241f233e5adbef8f28ba51d6ebab0b6284b5f6 Mon Sep 17 00:00:00 2001 From: Dmitry Arkhipov Date: Wed, 10 Jul 2024 11:56:14 +0300 Subject: [PATCH] remove unnecessary branch in string serialization --- include/boost/json/impl/serializer.ipp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/boost/json/impl/serializer.ipp b/include/boost/json/impl/serializer.ipp index df6dfea46..c57e8e1d6 100644 --- a/include/boost/json/impl/serializer.ipp +++ b/include/boost/json/impl/serializer.ipp @@ -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: