From 0b3909463b93f550040914321df1d7d71fa00703 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Fri, 3 Apr 2015 17:09:41 +0200 Subject: Replace boost::noncopyable with c++11 delete syntax. --- src/menu/application.hpp | 7 +++++-- src/menu/background.hpp | 7 +++++-- src/utils/activator.hpp | 8 +++++--- src/utils/disposer.hpp | 8 +++++--- 4 files changed, 20 insertions(+), 10 deletions(-) diff --git a/src/menu/application.hpp b/src/menu/application.hpp index 6d1b2b44..4e161d16 100644 --- a/src/menu/application.hpp +++ b/src/menu/application.hpp @@ -28,7 +28,6 @@ #include #include #include -#include #include #include @@ -38,7 +37,7 @@ namespace usdx { - class Application : public Container, public boost::noncopyable + class Application : public Container { private: static log4cpp::Category& log; @@ -67,6 +66,10 @@ namespace usdx Application(void); virtual ~Application(); + /* no copies */ + Application(const Application&) = delete; + Application& operator=(const Application&) = delete; + static Config* get_config(void); static bool is_gl_thread(void); diff --git a/src/menu/background.hpp b/src/menu/background.hpp index 0a7bee49..e48027f1 100644 --- a/src/menu/background.hpp +++ b/src/menu/background.hpp @@ -26,7 +26,6 @@ #define BACKGROUND_HPP #include "drawable.hpp" -#include namespace usdx { @@ -36,7 +35,7 @@ namespace usdx * Abstract class for backgrounds. Subclasses of this class, implement * different ways to draw the background for any DrawableControl. */ - class Background : public Drawable, public boost::noncopyable + class Background : public Drawable { private: const DrawableControl& parent; @@ -45,6 +44,10 @@ namespace usdx Background(const DrawableControl&); virtual ~Background(); + /* no copies */ + Background(const Background&) = delete; + Background& operator=(const Background&) = delete; + /** * Returns the parent DrawableControl, this background is attached * to. Could be used for example to determine the size of the parent diff --git a/src/utils/activator.hpp b/src/utils/activator.hpp index d11d7922..7c87d730 100644 --- a/src/utils/activator.hpp +++ b/src/utils/activator.hpp @@ -25,13 +25,11 @@ #ifndef ACTIVATOR_HPP #define ACTIVATOR_HPP -#include - #include "activatable.hpp" namespace usdx { - class Activator : public boost::noncopyable + class Activator { private: Activatable* activatable; @@ -39,6 +37,10 @@ namespace usdx public: Activator(Activatable* activatable); virtual ~Activator(); + + /* no copies */ + Activator(const Activator&) = delete; + Activator& operator=(const Activator&) = delete; }; } diff --git a/src/utils/disposer.hpp b/src/utils/disposer.hpp index 9f826d37..16f24aee 100644 --- a/src/utils/disposer.hpp +++ b/src/utils/disposer.hpp @@ -25,12 +25,10 @@ #ifndef DISPOSER_HPP #define DISPOSER_HPP -#include - namespace usdx { template - class Disposer : public boost::noncopyable + class Disposer { private: T* disposable; @@ -51,6 +49,10 @@ namespace usdx disposable->dispose(); delete disposable; } + + /* no copies */ + Disposer(const Disposer&) = delete; + Disposer& operator=(const Disposer&) = delete; }; } -- cgit v1.2.3