diff --git a/include/SFML/Graphics/CircleShape.hpp b/include/SFML/Graphics/CircleShape.hpp index 681e66107..cb0ffed0e 100644 --- a/include/SFML/Graphics/CircleShape.hpp +++ b/include/SFML/Graphics/CircleShape.hpp @@ -47,7 +47,7 @@ public : /// \param radius Radius of the circle /// //////////////////////////////////////////////////////////// - CircleShape(float radius = 0); + explicit CircleShape(float radius = 0); //////////////////////////////////////////////////////////// /// \brief Set the radius of the circle diff --git a/include/SFML/Graphics/ConvexShape.hpp b/include/SFML/Graphics/ConvexShape.hpp index d84bdfaff..ed3ccd39f 100644 --- a/include/SFML/Graphics/ConvexShape.hpp +++ b/include/SFML/Graphics/ConvexShape.hpp @@ -45,8 +45,10 @@ public : //////////////////////////////////////////////////////////// /// \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 diff --git a/include/SFML/Graphics/RectangleShape.hpp b/include/SFML/Graphics/RectangleShape.hpp index 907c3a7d1..48e9f5d4d 100644 --- a/include/SFML/Graphics/RectangleShape.hpp +++ b/include/SFML/Graphics/RectangleShape.hpp @@ -47,7 +47,7 @@ public : /// \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 diff --git a/src/SFML/Graphics/ConvexShape.cpp b/src/SFML/Graphics/ConvexShape.cpp index 9367d4b15..6c6954f12 100644 --- a/src/SFML/Graphics/ConvexShape.cpp +++ b/src/SFML/Graphics/ConvexShape.cpp @@ -31,8 +31,9 @@ namespace sf { //////////////////////////////////////////////////////////// -ConvexShape::ConvexShape() +ConvexShape::ConvexShape(unsigned int pointsCount) { + SetPointsCount(pointsCount); }