private copy constructor (to avoid unwanted close() in copie's destructor) v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Sat, 17 Aug 2019 18:51:35 +0200
branchv_0
changeset 2 abeba77ec581
parent 1 29cbe171cd43
child 3 1197b42e8b2e
private copy constructor (to avoid unwanted close() in copie's destructor)
src/cadMousePro.cpp
--- a/src/cadMousePro.cpp	Wed Aug 14 18:32:35 2019 +0200
+++ b/src/cadMousePro.cpp	Sat Aug 17 18:51:35 2019 +0200
@@ -24,6 +24,10 @@
 class HIDDevice {
 private:
 	hid_device* handle;
+
+	HIDDevice(const HIDDevice& other) : handle(other.handle) {
+	}
+
 public:
 
 	HIDDevice(unsigned short vendorId, unsigned short productId, const wchar_t *serialNumber) {