diff --git a/include/SFML/Graphics/View.hpp b/include/SFML/Graphics/View.hpp index 51ad64d10..ff4f37870 100644 --- a/include/SFML/Graphics/View.hpp +++ b/include/SFML/Graphics/View.hpp @@ -51,7 +51,7 @@ public: /// This constructor creates a default view of (0, 0, 1000, 1000) /// //////////////////////////////////////////////////////////// - View(); + View() = default; //////////////////////////////////////////////////////////// /// \brief Construct the view from a rectangle @@ -270,8 +270,8 @@ private: //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - Vector2f m_center; //!< Center of the view, in scene coordinates - Vector2f m_size; //!< Size of the view, in scene coordinates + Vector2f m_center{500, 500}; //!< Center of the view, in scene coordinates + Vector2f m_size{1000, 1000}; //!< Size of the view, in scene coordinates Angle m_rotation; //!< Angle of rotation of the view rectangle FloatRect m_viewport{{0, 0}, {1, 1}}; //!< Viewport rectangle, expressed as a factor of the render-target's size FloatRect m_scissor{{0, 0}, {1, 1}}; //!< Scissor rectangle, expressed as a factor of the render-target's size diff --git a/src/SFML/Graphics/View.cpp b/src/SFML/Graphics/View.cpp index b566a6f0f..8b16e6624 100644 --- a/src/SFML/Graphics/View.cpp +++ b/src/SFML/Graphics/View.cpp @@ -32,13 +32,6 @@ namespace sf { -//////////////////////////////////////////////////////////// -View::View() -{ - reset(FloatRect({0, 0}, {1000, 1000})); -} - - //////////////////////////////////////////////////////////// View::View(const FloatRect& rectangle) {