From 3738cd46a6c9daf56d02ea4de28ae84ec870b2f1 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Mon, 26 Oct 2026 17:18:58 -0400 Subject: [PATCH] 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 --- devices/perseus/deviceperseus.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/devices/perseus/deviceperseus.h b/devices/perseus/deviceperseus.h index 326449c1f..89221937f 100644 --- a/devices/perseus/deviceperseus.h +++ b/devices/perseus/deviceperseus.h @@ -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: