@@ -30,7 +30,7 @@ QgsRegularPolygon::QgsRegularPolygon()
30
30
}
31
31
32
32
33
- QgsRegularPolygon::QgsRegularPolygon ( const QgsPoint ¢er, const double radius, const double azimuth, const int numSides, const ConstructionOption circle )
33
+ QgsRegularPolygon::QgsRegularPolygon ( const QgsPoint ¢er, const double radius, const double azimuth, const unsigned int numSides, const ConstructionOption circle )
34
34
: mCenter( center )
35
35
, mFirstVertex( QgsPoint() )
36
36
, mNumberSides( 0 )
@@ -56,15 +56,13 @@ QgsRegularPolygon::QgsRegularPolygon( const QgsPoint ¢er, const double radiu
56
56
mFirstVertex = mCenter .project ( mRadius , azimuth - centralAngle ( numSides ) / 2 );
57
57
break ;
58
58
}
59
- default :
60
- break ;
61
59
}
62
60
63
61
}
64
62
65
63
}
66
64
67
- QgsRegularPolygon::QgsRegularPolygon ( const QgsPoint ¢er, const QgsPoint &pt1, const int numSides, const ConstructionOption circle )
65
+ QgsRegularPolygon::QgsRegularPolygon ( const QgsPoint ¢er, const QgsPoint &pt1, const unsigned int numSides, const ConstructionOption circle )
68
66
: mCenter( center )
69
67
, mFirstVertex( QgsPoint() )
70
68
, mNumberSides( 0 )
@@ -90,15 +88,13 @@ QgsRegularPolygon::QgsRegularPolygon( const QgsPoint ¢er, const QgsPoint &pt
90
88
mFirstVertex = mCenter .project ( mRadius , azimuth - centralAngle ( numSides ) / 2 );
91
89
break ;
92
90
}
93
- default :
94
- break ;
95
91
}
96
92
97
93
}
98
94
99
95
}
100
96
101
- QgsRegularPolygon::QgsRegularPolygon ( const QgsPoint &pt1, const QgsPoint &pt2, const int numSides )
97
+ QgsRegularPolygon::QgsRegularPolygon ( const QgsPoint &pt1, const QgsPoint &pt2, const unsigned int numSides )
102
98
: mCenter( QgsPoint() )
103
99
, mFirstVertex( QgsPoint() )
104
100
, mNumberSides( 0 )
@@ -166,7 +162,7 @@ void QgsRegularPolygon::setFirstVertex( const QgsPoint &firstVertex )
166
162
mCenter = mFirstVertex .project ( mRadius , azimuth );
167
163
}
168
164
169
- void QgsRegularPolygon::setNumberSides ( const int numSides )
165
+ void QgsRegularPolygon::setNumberSides ( const unsigned int numSides )
170
166
{
171
167
if ( numSides >= 3 )
172
168
{
0 commit comments