Browse Source

devices/perseus: Delete unsupported/unnecessary copy operations

Prevent copying or assigning DevicePerseus objects. The existing
copy constructor discarded the source state, while the assignment
operator performed no assignment, allowing misleading operations
that did not preserve object semantics.

Identified during static analysis by cppcheck

Signed-off-by: Robin Getz <rgetz503@gmail.com>
chirpmodem-v8.1.0
Robin Getz 4 weeks ago
parent
commit
3738cd46a6
No known key found for this signature in database
GPG Key ID: 51C7231FFED0E060
  1. 4
      devices/perseus/deviceperseus.h

4
devices/perseus/deviceperseus.h

@ -34,8 +34,8 @@ public: @@ -34,8 +34,8 @@ public:
protected:
DevicePerseus();
DevicePerseus(const DevicePerseus&) : m_nbDevices(0) {}
DevicePerseus& operator=(const DevicePerseus& other) { (void) other; return *this; }
DevicePerseus(const DevicePerseus&) = delete;
DevicePerseus& operator=(const DevicePerseus&) = delete;
~DevicePerseus();
private:

Loading…
Cancel
Save