Skip to content

Commit

Permalink
remove dead code from serializer
Browse files Browse the repository at this point in the history
  • Loading branch information
grisumbras committed Dec 15, 2023
1 parent 527023f commit 04b2683
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions include/boost/json/impl/serializer.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ enum class serializer::state : char
nul1, nul2, nul3, nul4,
tru1, tru2, tru3, tru4,
fal1, fal2, fal3, fal4, fal5,
str1, str2, str3, str4, esc1,
utf1, utf2, utf3, utf4, utf5,
str1, str2, str3, esc1, utf1,
utf2, utf3, utf4, utf5,
num,
arr1, arr2, arr3, arr4,
obj1, obj2, obj3, obj4, obj5, obj6
Expand Down Expand Up @@ -234,7 +234,6 @@ write_string(stream& ss0)
case state::str1: goto do_str1;
case state::str2: goto do_str2;
case state::str3: goto do_str3;
case state::str4: goto do_str4;
case state::esc1: goto do_esc1;
case state::utf1: goto do_utf1;
case state::utf2: goto do_utf2;
Expand Down Expand Up @@ -353,12 +352,6 @@ do_str3:
}
return suspend(state::str3);

do_str4:
if(BOOST_JSON_LIKELY(ss))
ss.append('\x22'); // '"'
else
return suspend(state::str4);

do_esc1:
if(BOOST_JSON_LIKELY(ss))
ss.append(buf_[0]);
Expand Down Expand Up @@ -702,8 +695,7 @@ write_value(stream& ss)
return write_false<StackEmpty>(ss);

case state::str1: case state::str2:
case state::str3: case state::str4:
case state::esc1:
case state::str3: case state::esc1:
case state::utf1: case state::utf2:
case state::utf3: case state::utf4:
case state::utf5:
Expand Down

0 comments on commit 04b2683

Please sign in to comment.