From 402d562e3d7d5aee7658492f9c8f1cd97da5a307 Mon Sep 17 00:00:00 2001 From: Adrien Guinet Date: Tue, 26 Feb 2019 10:55:49 +0100 Subject: [PATCH] Do not need boost::noncopyable anymore! --- include/usbtop/usb_bus.h | 4 +++- include/usbtop/usb_device.h | 4 +++- include/usbtop/usb_stats.h | 8 ++++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/include/usbtop/usb_bus.h b/include/usbtop/usb_bus.h index 9fe73e3..f8ac4f8 100644 --- a/include/usbtop/usb_bus.h +++ b/include/usbtop/usb_bus.h @@ -42,7 +42,7 @@ namespace usbtop { -class UsbBus: boost::noncopyable +class UsbBus { public: typedef size_t id_type; @@ -68,6 +68,8 @@ class UsbBus: boost::noncopyable _stats(std::move(o._stats)) { } + UsbBus(UsbBus const&) = delete; + ~UsbBus(); public: diff --git a/include/usbtop/usb_device.h b/include/usbtop/usb_device.h index 0fa3c5c..1a32076 100644 --- a/include/usbtop/usb_device.h +++ b/include/usbtop/usb_device.h @@ -38,7 +38,7 @@ namespace usbtop { class UsbBus; -class UsbDevice: boost::noncopyable +class UsbDevice { friend class UsbBus; @@ -57,6 +57,8 @@ class UsbDevice: boost::noncopyable _bus(o._bus) { } + UsbDevice(UsbDevice const&) = delete; + public: void push(const double ts, const size_t size, const UsbStats::direction_type dir); diff --git a/include/usbtop/usb_stats.h b/include/usbtop/usb_stats.h index 967c5ee..e569aae 100644 --- a/include/usbtop/usb_stats.h +++ b/include/usbtop/usb_stats.h @@ -40,7 +40,7 @@ namespace usbtop { -class Stats: boost::noncopyable +class Stats { typedef std::pair sample_t; public: @@ -52,6 +52,8 @@ class Stats: boost::noncopyable inst_data_(std::move(o.inst_data_)) { } + Stats(Stats const& o) = delete; + public: static void init(); void push(double timestamp, size_t spacket); @@ -79,7 +81,7 @@ class Stats: boost::noncopyable double stats_window_; }; -class UsbStats: boost::noncopyable +class UsbStats { public: // The order of this enum is important !! (cf. UsbBus::push) @@ -96,6 +98,8 @@ class UsbStats: boost::noncopyable _to_device(std::move(o._to_device)) { } + UsbStats(UsbStats const&) = delete; + public: inline void push(const double ts, const size_t size, const direction_type dir) {