From e59d9799691dda8009d980e2dd770fbf9a3cc8f8 Mon Sep 17 00:00:00 2001 From: artemp Date: Fri, 1 Mar 2013 16:53:32 -0500 Subject: [PATCH] + remove unused members --- deps/agg/include/agg_conv_clipper.h | 31 ++++++++++------------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/deps/agg/include/agg_conv_clipper.h b/deps/agg/include/agg_conv_clipper.h index d49d5e04c..a035b3f86 100755 --- a/deps/agg/include/agg_conv_clipper.h +++ b/deps/agg/include/agg_conv_clipper.h @@ -48,8 +48,6 @@ private: ClipperLib::Clipper m_clipper; clipper_PolyFillType m_subjFillType; clipper_PolyFillType m_clipFillType; - double start_x_; - double start_y_; int Round(double val) { @@ -69,9 +67,7 @@ public: m_contour(-1), m_operation(op), m_subjFillType(subjFillType), - m_clipFillType(clipFillType), - start_x_(0), - start_y_(0) + m_clipFillType(clipFillType) { m_scaling_factor = std::max(std::min(scaling_factor, 6),0); m_scaling_factor = Round(std::pow((double)10, m_scaling_factor)); @@ -88,9 +84,7 @@ public: m_contour(-1), m_operation(op), m_subjFillType(subjFillType), - m_clipFillType(clipFillType), - start_x_(0), - start_y_(0) + m_clipFillType(clipFillType) { m_scaling_factor = std::max(std::min(scaling_factor, 6),0); m_scaling_factor = Round(std::pow((double)10, m_scaling_factor)); @@ -282,21 +276,19 @@ bool conv_clipper::next_vertex(double *x, double *y) template unsigned conv_clipper::vertex(double *x, double *y) { - if( m_status == status_move_to ) + switch (m_status) + { + case status_move_to: { if( next_contour() ) { - if( next_vertex( x, y ) ) + if ( next_vertex( x, y ) ) { m_status = status_line_to; - start_x_ = *x; - start_y_ = *y; return path_cmd_move_to; } else { - *x = start_x_; - *y = start_y_; m_status = status_close_path; return path_cmd_line_to; } @@ -304,18 +296,18 @@ unsigned conv_clipper::vertex(double *x, double *y) else return path_cmd_stop; } - else if ( m_status == status_close_path) + case status_close_path: { *x = 0; *y = 0; m_status = status_move_to; return path_cmd_end_poly | path_flags_close; } - else if (m_status == status_stop) + case status_stop: { return path_cmd_stop; } - else + default: { if( next_vertex( x, y ) ) { @@ -323,12 +315,11 @@ unsigned conv_clipper::vertex(double *x, double *y) } else { - *x = start_x_; - *y = start_y_; m_status = status_close_path; - return path_cmd_line_to;//path_cmd_end_poly | path_flags_close; + return path_cmd_line_to; } } + } } //------------------------------------------------------------------------------