Use = default to define empty destructors #2311

This commit is contained in:
Benjamin Li 2022-12-25 15:07:23 -05:00 committed by Lukas Dürrenberger
parent 50d86e4755
commit 9c7b7d68c0
9 changed files with 6 additions and 61 deletions

View File

@ -59,9 +59,7 @@ public:
/// \brief Virtual destructor /// \brief Virtual destructor
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual ~SoundFileReader() virtual ~SoundFileReader() = default;
{
}
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Open a sound file for reading /// \brief Open a sound file for reading

View File

@ -47,9 +47,7 @@ public:
/// \brief Virtual destructor /// \brief Virtual destructor
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual ~SoundFileWriter() virtual ~SoundFileWriter() = default;
{
}
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Open a sound file for writing /// \brief Open a sound file for writing

View File

@ -48,9 +48,7 @@ public:
/// \brief Virtual destructor /// \brief Virtual destructor
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual ~Drawable() virtual ~Drawable() = default;
{
}
protected: protected:
friend class RenderTarget; friend class RenderTarget;

View File

@ -48,9 +48,7 @@ public:
/// \brief Virtual destructor /// \brief Virtual destructor
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual ~InputStream() virtual ~InputStream() = default;
{
}
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Read data from the stream /// \brief Read data from the stream

View File

@ -76,7 +76,6 @@ source_group("drawables" FILES ${DRAWABLES_SRC})
# render-texture sources # render-texture sources
set(RENDER_TEXTURE_SRC set(RENDER_TEXTURE_SRC
${SRCROOT}/RenderTextureImpl.cpp
${SRCROOT}/RenderTextureImpl.hpp ${SRCROOT}/RenderTextureImpl.hpp
${SRCROOT}/RenderTextureImplFBO.cpp ${SRCROOT}/RenderTextureImplFBO.cpp
${SRCROOT}/RenderTextureImplFBO.hpp ${SRCROOT}/RenderTextureImplFBO.hpp

View File

@ -1,40 +0,0 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2022 Laurent Gomila (laurent@sfml-dev.org)
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it freely,
// subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented;
// you must not claim that you wrote the original software.
// If you use this software in a product, an acknowledgment
// in the product documentation would be appreciated but is not required.
//
// 2. Altered source versions must be plainly marked as such,
// and must not be misrepresented as being the original software.
//
// 3. This notice may not be removed or altered from any source distribution.
//
////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Graphics/RenderTextureImpl.hpp>
namespace sf
{
namespace priv
{
////////////////////////////////////////////////////////////
RenderTextureImpl::~RenderTextureImpl() = default;
} // namespace priv
} // namespace sf

View File

@ -55,7 +55,7 @@ public:
/// \brief Destructor /// \brief Destructor
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual ~RenderTextureImpl(); virtual ~RenderTextureImpl() = default;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Deleted copy constructor /// \brief Deleted copy constructor

View File

@ -72,7 +72,7 @@ public:
/// \brief Destructor /// \brief Destructor
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
~WindowImplUIKit(); ~WindowImplUIKit() = default;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Get the OS-specific handle of the window /// \brief Get the OS-specific handle of the window

View File

@ -86,12 +86,6 @@ WindowImplUIKit::WindowImplUIKit(VideoMode mode, const String& /* title */, unsi
} }
////////////////////////////////////////////////////////////
WindowImplUIKit::~WindowImplUIKit()
{
}
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
void WindowImplUIKit::processEvents() void WindowImplUIKit::processEvents()
{ {