Browse Source

device: delete InputDevice copy ctor / assign operator

rdb 7 years ago
parent
commit
85752b06f5

+ 0 - 16
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 &copy) {
-  nassertv(false);
-}
-
-/**
- *
- */
-void InputDevice::
-operator = (const InputDevice &copy) {
-  nassertv(false);
-}
-
 /**
  *
  */

+ 3 - 3
panda/src/device/inputDevice.h

@@ -165,9 +165,9 @@ protected:
 
 public:
   InputDevice();
-  InputDevice(const InputDevice &copy);
-  void operator = (const InputDevice &copy);
-  ~InputDevice();
+  InputDevice(const InputDevice &copy) = delete;
+  InputDevice &operator = (const InputDevice &copy) = delete;
+  virtual ~InputDevice();
 
   INLINE std::string get_name() const;
   INLINE std::string get_manufacturer() const;

+ 0 - 23
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 &copy) {
-  *this = copy;
-}
-
-/**
- *
- */
-void GraphicsWindowInputDevice::
-operator = (const GraphicsWindowInputDevice &copy) {
-  InputDevice::operator = (copy);
-}
-
-/**
- *
- */
-GraphicsWindowInputDevice::
-~GraphicsWindowInputDevice() {
-}
-
 /**
  * Records that the indicated button has been depressed.
  */

+ 0 - 3
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 &copy);
-  void operator = (const GraphicsWindowInputDevice &copy);
-  ~GraphicsWindowInputDevice();
 
 PUBLISHED:
   // The following interface is for the various kinds of GraphicsWindows to