Made one-arg constructors explicit in shapes classes

This commit is contained in:
Laurent Gomila 2011-12-04 20:43:28 +01:00
parent a2fcb75876
commit 6381d10d40
4 changed files with 7 additions and 4 deletions

View File

@ -47,7 +47,7 @@ public :
/// \param radius Radius of the circle /// \param radius Radius of the circle
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
CircleShape(float radius = 0); explicit CircleShape(float radius = 0);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Set the radius of the circle /// \brief Set the radius of the circle

View File

@ -45,8 +45,10 @@ public :
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Default constructor /// \brief Default constructor
/// ///
/// \param pointsCount Number of points of the polygon
///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
ConvexShape(); explicit ConvexShape(unsigned int pointsCount = 0);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Set the number of points of the polygon /// \brief Set the number of points of the polygon

View File

@ -47,7 +47,7 @@ public :
/// \param size Size of the rectangle /// \param size Size of the rectangle
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
RectangleShape(const Vector2f& size = Vector2f(0, 0)); explicit RectangleShape(const Vector2f& size = Vector2f(0, 0));
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Set the size of the rectangle /// \brief Set the size of the rectangle

View File

@ -31,8 +31,9 @@
namespace sf namespace sf
{ {
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
ConvexShape::ConvexShape() ConvexShape::ConvexShape(unsigned int pointsCount)
{ {
SetPointsCount(pointsCount);
} }