+ remove unused members

This commit is contained in:
artemp 2013-03-01 16:53:32 -05:00
parent af8f2e0ee8
commit e59d979969

View file

@ -48,8 +48,6 @@ private:
ClipperLib::Clipper m_clipper; ClipperLib::Clipper m_clipper;
clipper_PolyFillType m_subjFillType; clipper_PolyFillType m_subjFillType;
clipper_PolyFillType m_clipFillType; clipper_PolyFillType m_clipFillType;
double start_x_;
double start_y_;
int Round(double val) int Round(double val)
{ {
@ -69,9 +67,7 @@ public:
m_contour(-1), m_contour(-1),
m_operation(op), m_operation(op),
m_subjFillType(subjFillType), m_subjFillType(subjFillType),
m_clipFillType(clipFillType), m_clipFillType(clipFillType)
start_x_(0),
start_y_(0)
{ {
m_scaling_factor = std::max(std::min(scaling_factor, 6),0); m_scaling_factor = std::max(std::min(scaling_factor, 6),0);
m_scaling_factor = Round(std::pow((double)10, m_scaling_factor)); m_scaling_factor = Round(std::pow((double)10, m_scaling_factor));
@ -88,9 +84,7 @@ public:
m_contour(-1), m_contour(-1),
m_operation(op), m_operation(op),
m_subjFillType(subjFillType), m_subjFillType(subjFillType),
m_clipFillType(clipFillType), m_clipFillType(clipFillType)
start_x_(0),
start_y_(0)
{ {
m_scaling_factor = std::max(std::min(scaling_factor, 6),0); m_scaling_factor = std::max(std::min(scaling_factor, 6),0);
m_scaling_factor = Round(std::pow((double)10, m_scaling_factor)); m_scaling_factor = Round(std::pow((double)10, m_scaling_factor));
@ -282,21 +276,19 @@ bool conv_clipper<VSA, VSB>::next_vertex(double *x, double *y)
template<class VSA, class VSB> template<class VSA, class VSB>
unsigned conv_clipper<VSA, VSB>::vertex(double *x, double *y) unsigned conv_clipper<VSA, VSB>::vertex(double *x, double *y)
{ {
if( m_status == status_move_to ) switch (m_status)
{
case status_move_to:
{ {
if( next_contour() ) if( next_contour() )
{ {
if( next_vertex( x, y ) ) if ( next_vertex( x, y ) )
{ {
m_status = status_line_to; m_status = status_line_to;
start_x_ = *x;
start_y_ = *y;
return path_cmd_move_to; return path_cmd_move_to;
} }
else else
{ {
*x = start_x_;
*y = start_y_;
m_status = status_close_path; m_status = status_close_path;
return path_cmd_line_to; return path_cmd_line_to;
} }
@ -304,18 +296,18 @@ unsigned conv_clipper<VSA, VSB>::vertex(double *x, double *y)
else else
return path_cmd_stop; return path_cmd_stop;
} }
else if ( m_status == status_close_path) case status_close_path:
{ {
*x = 0; *x = 0;
*y = 0; *y = 0;
m_status = status_move_to; m_status = status_move_to;
return path_cmd_end_poly | path_flags_close; return path_cmd_end_poly | path_flags_close;
} }
else if (m_status == status_stop) case status_stop:
{ {
return path_cmd_stop; return path_cmd_stop;
} }
else default:
{ {
if( next_vertex( x, y ) ) if( next_vertex( x, y ) )
{ {
@ -323,12 +315,11 @@ unsigned conv_clipper<VSA, VSB>::vertex(double *x, double *y)
} }
else else
{ {
*x = start_x_;
*y = start_y_;
m_status = status_close_path; m_status = status_close_path;
return path_cmd_line_to;//path_cmd_end_poly | path_flags_close; return path_cmd_line_to;
} }
} }
}
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------