diff --git a/src/Platform/AbstractXApplication.h b/src/Platform/AbstractXApplication.h index 6a5a412ea..56e5ab78d 100644 --- a/src/Platform/AbstractXApplication.h +++ b/src/Platform/AbstractXApplication.h @@ -83,11 +83,6 @@ class AbstractXApplication { void exit() { flags |= Flag::Exit; } protected: - /** - * @brief Destructor - * - * Deletes context and destroys the window. - */ /* Nobody will need to have (and delete) AbstractXApplication*, thus this is faster than public pure virtual destructor */ ~AbstractXApplication(); diff --git a/src/Platform/GlxApplication.cpp b/src/Platform/GlxApplication.cpp index b9f4b3d37..303c16dcf 100644 --- a/src/Platform/GlxApplication.cpp +++ b/src/Platform/GlxApplication.cpp @@ -38,6 +38,8 @@ GlxApplication::GlxApplication(const Arguments& arguments, void*) #endif : AbstractXApplication(new Implementation::GlxContextHandler, arguments, nullptr) {} +GlxApplication::~GlxApplication() = default; + template class BasicScreen; template class BasicScreenedApplication; diff --git a/src/Platform/ScreenedApplication.h b/src/Platform/ScreenedApplication.h index 3bc129f2d..dc962bdf9 100644 --- a/src/Platform/ScreenedApplication.h +++ b/src/Platform/ScreenedApplication.h @@ -94,10 +94,10 @@ template class BasicScreenedApplication: public Application, public: /** @copydoc Sdl2Application::Sdl2Application(const Arguments, const Configuration&) */ - BasicScreenedApplication(const typename Application::Arguments& arguments, const typename Application::Configuration& configuration = Application::Configuration()): Application(arguments, configuration) {} + explicit BasicScreenedApplication(const typename Application::Arguments& arguments, const typename Application::Configuration& configuration = Application::Configuration()); /** @copydoc Sdl2Application::Sdl2Application(const Arguments&, std::nullptr_t) */ - BasicScreenedApplication(const typename Application::Arguments& arguments, std::nullptr_t): Application(arguments, nullptr) {} + explicit BasicScreenedApplication(const typename Application::Arguments& arguments, std::nullptr_t); /** * @brief Add screen to application @@ -157,6 +157,10 @@ template class BasicScreenedApplication: public Application, } protected: + /* Nobody will need to have (and delete) ScreenedApplication*, thus + this is faster than public pure virtual destructor */ + ~BasicScreenedApplication(); + /** * @brief Global viewport event * diff --git a/src/Platform/ScreenedApplication.hpp b/src/Platform/ScreenedApplication.hpp index 6cf03ddb9..2063c51fb 100644 --- a/src/Platform/ScreenedApplication.hpp +++ b/src/Platform/ScreenedApplication.hpp @@ -41,6 +41,12 @@ template void BasicScreen::mousePressEvent(Mouse template void BasicScreen::mouseReleaseEvent(MouseEvent&) {} template void BasicScreen::mouseMoveEvent(MouseMoveEvent&) {} +template BasicScreenedApplication::BasicScreenedApplication(const typename Application::Arguments& arguments, const typename Application::Configuration& configuration): Application(arguments, configuration) {} + +template BasicScreenedApplication::BasicScreenedApplication(const typename Application::Arguments& arguments, std::nullptr_t): Application(arguments, nullptr) {} + +template BasicScreenedApplication::~BasicScreenedApplication() = default; + template BasicScreenedApplication& BasicScreenedApplication::addScreen(BasicScreen& screen) { Containers::LinkedList>::insert(&screen); if(frontScreen() == &screen) screen.focusEvent(); diff --git a/src/Platform/Sdl2Application.h b/src/Platform/Sdl2Application.h index 319006b60..89d55634b 100644 --- a/src/Platform/Sdl2Application.h +++ b/src/Platform/Sdl2Application.h @@ -160,7 +160,7 @@ class Sdl2Application { protected: /* Nobody will need to have (and delete) Sdl2Application*, thus this is faster than public pure virtual destructor */ - virtual ~Sdl2Application(); + ~Sdl2Application(); /** @copydoc GlutApplication::createContext() */ void createContext(const Configuration& configuration); diff --git a/src/Platform/XEglApplication.cpp b/src/Platform/XEglApplication.cpp index 264e955ea..7640cc2f2 100644 --- a/src/Platform/XEglApplication.cpp +++ b/src/Platform/XEglApplication.cpp @@ -38,6 +38,8 @@ XEglApplication::XEglApplication(const Arguments& arguments, void*) #endif : AbstractXApplication(new Implementation::EglContextHandler, arguments, nullptr) {} +XEglApplication::~XEglApplication() = default; + template class BasicScreen; template class BasicScreenedApplication; diff --git a/src/Text/Text.h b/src/Text/Text.h index c1f65b53c..4a0960e60 100644 --- a/src/Text/Text.h +++ b/src/Text/Text.h @@ -40,9 +40,7 @@ class AbstractLayouter; class DistanceFieldGlyphCache; class GlyphCache; -#ifndef MAGNUM_GCC46_COMPATIBILITY enum class Alignment: UnsignedByte; -#endif class AbstractRenderer; template class Renderer;