Skip to content

Commit f6d7120

Browse files
committed
Remove default statements for better compiler warnings
1 parent 328fc9c commit f6d7120

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/core/geometry/qgsregularpolygon.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ QgsRegularPolygon::QgsRegularPolygon()
3030
}
3131

3232

33-
QgsRegularPolygon::QgsRegularPolygon( const QgsPoint &center, const double radius, const double azimuth, const int numSides, const ConstructionOption circle )
33+
QgsRegularPolygon::QgsRegularPolygon( const QgsPoint &center, const double radius, const double azimuth, const unsigned int numSides, const ConstructionOption circle )
3434
: mCenter( center )
3535
, mFirstVertex( QgsPoint() )
3636
, mNumberSides( 0 )
@@ -56,15 +56,13 @@ QgsRegularPolygon::QgsRegularPolygon( const QgsPoint &center, const double radiu
5656
mFirstVertex = mCenter.project( mRadius, azimuth - centralAngle( numSides ) / 2 );
5757
break;
5858
}
59-
default:
60-
break;
6159
}
6260

6361
}
6462

6563
}
6664

67-
QgsRegularPolygon::QgsRegularPolygon( const QgsPoint &center, const QgsPoint &pt1, const int numSides, const ConstructionOption circle )
65+
QgsRegularPolygon::QgsRegularPolygon( const QgsPoint &center, const QgsPoint &pt1, const unsigned int numSides, const ConstructionOption circle )
6866
: mCenter( center )
6967
, mFirstVertex( QgsPoint() )
7068
, mNumberSides( 0 )
@@ -90,15 +88,13 @@ QgsRegularPolygon::QgsRegularPolygon( const QgsPoint &center, const QgsPoint &pt
9088
mFirstVertex = mCenter.project( mRadius, azimuth - centralAngle( numSides ) / 2 );
9189
break;
9290
}
93-
default:
94-
break;
9591
}
9692

9793
}
9894

9995
}
10096

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 )
10298
: mCenter( QgsPoint() )
10399
, mFirstVertex( QgsPoint() )
104100
, mNumberSides( 0 )
@@ -166,7 +162,7 @@ void QgsRegularPolygon::setFirstVertex( const QgsPoint &firstVertex )
166162
mCenter = mFirstVertex.project( mRadius, azimuth );
167163
}
168164

169-
void QgsRegularPolygon::setNumberSides( const int numSides )
165+
void QgsRegularPolygon::setNumberSides( const unsigned int numSides )
170166
{
171167
if ( numSides >= 3 )
172168
{

0 commit comments

Comments
 (0)