Skip to content

Commit

Permalink
Forgot several switch case fallthrough.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.code.sf.net/p/agg/svn@141 ab9de31f-a152-4fe9-8809-95f286f9ca89
  • Loading branch information
xakod committed Nov 9, 2024
1 parent d63b30a commit a66541a
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/agg_gsv_text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,7 @@ namespace agg
}
m_status = next_char;

AGG_FALLTHROUGH
case next_char:
if(*m_cur_chr == 0)
{
Expand All @@ -634,6 +635,7 @@ namespace agg
m_eglyph = m_glyphs + value(m_indices + idx + 2);
m_status = start_glyph;

AGG_FALLTHROUGH
case start_glyph:
*x = m_x;
*y = m_y;
Expand Down
8 changes: 8 additions & 0 deletions src/agg_rounded_rect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,44 +114,52 @@ namespace agg
m_arc.rewind(0);
m_status++;

AGG_FALLTHROUGH
case 1:
cmd = m_arc.vertex(x, y);
if(is_stop(cmd)) m_status++;
else return cmd;

AGG_FALLTHROUGH
case 2:
m_arc.init(m_x2 - m_rx2, m_y1 + m_ry2, m_rx2, m_ry2,
pi+pi*0.5, 0.0);
m_arc.rewind(0);
m_status++;

AGG_FALLTHROUGH
case 3:
cmd = m_arc.vertex(x, y);
if(is_stop(cmd)) m_status++;
else return path_cmd_line_to;

AGG_FALLTHROUGH
case 4:
m_arc.init(m_x2 - m_rx3, m_y2 - m_ry3, m_rx3, m_ry3,
0.0, pi*0.5);
m_arc.rewind(0);
m_status++;

AGG_FALLTHROUGH
case 5:
cmd = m_arc.vertex(x, y);
if(is_stop(cmd)) m_status++;
else return path_cmd_line_to;

AGG_FALLTHROUGH
case 6:
m_arc.init(m_x1 + m_rx4, m_y2 - m_ry4, m_rx4, m_ry4,
pi*0.5, pi);
m_arc.rewind(0);
m_status++;

AGG_FALLTHROUGH
case 7:
cmd = m_arc.vertex(x, y);
if(is_stop(cmd)) m_status++;
else return path_cmd_line_to;

AGG_FALLTHROUGH
case 8:
cmd = +path_cmd_end_poly | path_flags_close | path_flags_ccw;
m_status++;
Expand Down
2 changes: 2 additions & 0 deletions src/agg_vcgen_bspline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ namespace agg
case initial:
rewind(0);

AGG_FALLTHROUGH
case ready:
if(m_src_vertices.size() < 2)
{
Expand All @@ -155,6 +156,7 @@ namespace agg
m_status = polygon;
m_src_vertex = 0;

AGG_FALLTHROUGH
case polygon:
if(m_cur_abscissa >= m_max_abscissa)
{
Expand Down
3 changes: 3 additions & 0 deletions src/agg_vcgen_contour.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ namespace agg
case initial:
rewind(0);

AGG_FALLTHROUGH
case ready:
if(m_src_vertices.size() < 2 + unsigned(m_closed != 0))
{
Expand All @@ -119,6 +120,7 @@ namespace agg
m_src_vertex = 0;
m_out_vertex = 0;

AGG_FALLTHROUGH
case outline:
if(m_src_vertex >= m_src_vertices.size())
{
Expand All @@ -135,6 +137,7 @@ namespace agg
m_status = out_vertices;
m_out_vertex = 0;

AGG_FALLTHROUGH
case out_vertices:
if(m_out_vertex >= m_out_vertices.size())
{
Expand Down
1 change: 1 addition & 0 deletions src/agg_vcgen_dash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ namespace agg
case initial:
rewind(0);

AGG_FALLTHROUGH
case ready:
if(m_num_dashes < 2 || m_src_vertices.size() < 2)
{
Expand Down
2 changes: 2 additions & 0 deletions src/agg_vcgen_smooth_poly1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ namespace agg
case initial:
rewind(0);

AGG_FALLTHROUGH
case ready:
if(m_src_vertices.size() < 2)
{
Expand All @@ -131,6 +132,7 @@ namespace agg
m_status = polygon;
m_src_vertex = 0;

AGG_FALLTHROUGH
case polygon:
if(m_closed)
{
Expand Down
2 changes: 2 additions & 0 deletions src/agg_vcgen_stroke.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ namespace agg
case initial:
rewind(0);

AGG_FALLTHROUGH
case ready:
if(m_src_vertices.size() < 2 + unsigned(m_closed != 0))
{
Expand Down Expand Up @@ -158,6 +159,7 @@ namespace agg
m_status = outline2;
cmd = path_cmd_move_to;

AGG_FALLTHROUGH
case outline2:
if(m_src_vertex <= unsigned(m_closed == 0))
{
Expand Down

0 comments on commit a66541a

Please sign in to comment.