From 7805153e1716edd933c0b1485b0524dc1ec6ebc1 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Fri, 17 May 2019 13:44:14 +1000 Subject: [PATCH] nocopy: remove deprecated header --- CMakeLists.txt | 1 - log.hpp | 18 ++++++++++++++---- nocopy.hpp | 27 --------------------------- pool.hpp | 1 - signal.hpp | 1 - 5 files changed, 14 insertions(+), 34 deletions(-) delete mode 100644 nocopy.hpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 091cf3b6..accbedfe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -405,7 +405,6 @@ list ( matrix.hpp memory/deleter.cpp memory/deleter.hpp - nocopy.hpp parallel/queue.cpp parallel/queue.hpp parse/time.cpp diff --git a/log.hpp b/log.hpp index 30cc284c..adac86f9 100644 --- a/log.hpp +++ b/log.hpp @@ -9,8 +9,6 @@ #ifndef CRUFT_UTIL_LOG_HPP #define CRUFT_UTIL_LOG_HPP -#include "nocopy.hpp" - #include "format.hpp" #include @@ -111,11 +109,17 @@ namespace cruft { /////////////////////////////////////////////////////////////////////////// - class scoped_logger : public nocopy { + class scoped_logger { public: scoped_logger (level_t, std::string); ~scoped_logger (); + scoped_logger (scoped_logger const&) = delete; + scoped_logger& operator= (scoped_logger const&) = delete; + + scoped_logger (scoped_logger &&) = delete; + scoped_logger& operator= (scoped_logger &&) = delete; + protected: const level_t m_level; const std::string m_message; @@ -123,11 +127,17 @@ namespace cruft { /////////////////////////////////////////////////////////////////////////// - class scoped_timer : public nocopy { + class scoped_timer { public: scoped_timer (level_t, std::string); ~scoped_timer (); + scoped_timer (scoped_timer const&) = delete; + scoped_timer& operator= (scoped_timer const&) = delete; + + scoped_timer (scoped_timer &&) = delete; + scoped_timer& operator= (scoped_timer &&) = delete; + private: const level_t m_level; const std::string m_message; diff --git a/nocopy.hpp b/nocopy.hpp deleted file mode 100644 index ad83c58c..00000000 --- a/nocopy.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/* - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * Copyright 2010 Danny Robson - */ - -#ifndef __NOCOPY_HPP -#define __NOCOPY_HPP - -namespace cruft { - class nocopy { - protected: - nocopy () { ; } - ~nocopy () { ; } - - private: - nocopy (const nocopy & ) = delete; - nocopy ( nocopy &&) = delete; - - nocopy& operator= (const nocopy & ) = delete; - nocopy& operator= ( nocopy &&) = delete; - }; -} - -#endif diff --git a/pool.hpp b/pool.hpp index a9782125..b863508a 100644 --- a/pool.hpp +++ b/pool.hpp @@ -8,7 +8,6 @@ #pragma once -#include "nocopy.hpp" #include "debug/assert.hpp" #include "cast.hpp" diff --git a/signal.hpp b/signal.hpp index 3638851d..40fdaf01 100644 --- a/signal.hpp +++ b/signal.hpp @@ -10,7 +10,6 @@ #include "types/traits.hpp" #include "debug/assert.hpp" -#include "nocopy.hpp" #include #include