mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
Remove unnecessary default destructor
sf::RenderWindow still inherits a virtual destructor from a base class so there's no need to explicitly declare a virtual destructor. I added a test to ensure this property was not broken.
This commit is contained in:
parent
a9d9ef6d83
commit
4346b9a8bc
@ -96,14 +96,6 @@ public:
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
explicit RenderWindow(WindowHandle handle, const ContextSettings& settings = ContextSettings());
|
explicit RenderWindow(WindowHandle handle, const ContextSettings& settings = ContextSettings());
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
|
||||||
/// \brief Destructor
|
|
||||||
///
|
|
||||||
/// Closes the window and frees all the resources attached to it.
|
|
||||||
///
|
|
||||||
////////////////////////////////////////////////////////////
|
|
||||||
~RenderWindow() override;
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Get the size of the rendering region of the window
|
/// \brief Get the size of the rendering region of the window
|
||||||
///
|
///
|
||||||
|
@ -52,10 +52,6 @@ RenderWindow::RenderWindow(WindowHandle handle, const ContextSettings& settings)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
|
||||||
RenderWindow::~RenderWindow() = default;
|
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
Vector2u RenderWindow::getSize() const
|
Vector2u RenderWindow::getSize() const
|
||||||
{
|
{
|
||||||
|
@ -17,6 +17,7 @@ TEST_CASE("[Graphics] sf::RenderWindow", runDisplayTests())
|
|||||||
{
|
{
|
||||||
SECTION("Type traits")
|
SECTION("Type traits")
|
||||||
{
|
{
|
||||||
|
STATIC_CHECK(std::has_virtual_destructor_v<sf::RenderWindow>);
|
||||||
STATIC_CHECK(!std::is_copy_constructible_v<sf::RenderWindow>);
|
STATIC_CHECK(!std::is_copy_constructible_v<sf::RenderWindow>);
|
||||||
STATIC_CHECK(!std::is_copy_assignable_v<sf::RenderWindow>);
|
STATIC_CHECK(!std::is_copy_assignable_v<sf::RenderWindow>);
|
||||||
STATIC_CHECK(!std::is_nothrow_move_constructible_v<sf::RenderWindow>);
|
STATIC_CHECK(!std::is_nothrow_move_constructible_v<sf::RenderWindow>);
|
||||||
|
Loading…
Reference in New Issue
Block a user