From 85752b06f5614d67f20754801a9f96b466d8fa7d Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 28 Sep 2018 17:20:50 +0200 Subject: [PATCH] device: delete InputDevice copy ctor / assign operator --- panda/src/device/inputDevice.cxx | 16 ------------- panda/src/device/inputDevice.h | 6 ++--- .../src/display/graphicsWindowInputDevice.cxx | 23 ------------------- panda/src/display/graphicsWindowInputDevice.h | 3 --- 4 files changed, 3 insertions(+), 45 deletions(-) diff --git a/panda/src/device/inputDevice.cxx b/panda/src/device/inputDevice.cxx index aedfeb8222..742c31b688 100644 --- a/panda/src/device/inputDevice.cxx +++ b/panda/src/device/inputDevice.cxx @@ -37,22 +37,6 @@ InputDevice(const std::string &name, DeviceClass dev_class, int flags) : _button_events = new ButtonEventList; } -/** - * - */ -InputDevice:: -InputDevice(const InputDevice ©) { - nassertv(false); -} - -/** - * - */ -void InputDevice:: -operator = (const InputDevice ©) { - nassertv(false); -} - /** * */ diff --git a/panda/src/device/inputDevice.h b/panda/src/device/inputDevice.h index 10ad2c8177..24b27186e3 100644 --- a/panda/src/device/inputDevice.h +++ b/panda/src/device/inputDevice.h @@ -165,9 +165,9 @@ protected: public: InputDevice(); - InputDevice(const InputDevice ©); - void operator = (const InputDevice ©); - ~InputDevice(); + InputDevice(const InputDevice ©) = delete; + InputDevice &operator = (const InputDevice ©) = delete; + virtual ~InputDevice(); INLINE std::string get_name() const; INLINE std::string get_manufacturer() const; diff --git a/panda/src/display/graphicsWindowInputDevice.cxx b/panda/src/display/graphicsWindowInputDevice.cxx index e967216f03..3d7102f06f 100644 --- a/panda/src/display/graphicsWindowInputDevice.cxx +++ b/panda/src/display/graphicsWindowInputDevice.cxx @@ -62,29 +62,6 @@ pointer_and_keyboard(GraphicsWindow *host, const string &name) { GraphicsWindowInputDevice(host, name, IDF_has_pointer | IDF_has_keyboard); } -/** - * - */ -GraphicsWindowInputDevice:: -GraphicsWindowInputDevice(const GraphicsWindowInputDevice ©) { - *this = copy; -} - -/** - * - */ -void GraphicsWindowInputDevice:: -operator = (const GraphicsWindowInputDevice ©) { - InputDevice::operator = (copy); -} - -/** - * - */ -GraphicsWindowInputDevice:: -~GraphicsWindowInputDevice() { -} - /** * Records that the indicated button has been depressed. */ diff --git a/panda/src/display/graphicsWindowInputDevice.h b/panda/src/display/graphicsWindowInputDevice.h index 1573618723..1f9d941add 100644 --- a/panda/src/display/graphicsWindowInputDevice.h +++ b/panda/src/display/graphicsWindowInputDevice.h @@ -35,9 +35,6 @@ public: static PT(GraphicsWindowInputDevice) pointer_and_keyboard(GraphicsWindow *host, const std::string &name); INLINE GraphicsWindowInputDevice(); - GraphicsWindowInputDevice(const GraphicsWindowInputDevice ©); - void operator = (const GraphicsWindowInputDevice ©); - ~GraphicsWindowInputDevice(); PUBLISHED: // The following interface is for the various kinds of GraphicsWindows to