mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-09-25 03:38:22 +08:00
fix(ci): enable clang-tidy bugprone-unhandled-self-assignment / cert-oop54-cpp (#26767)
Signed-off-by: kuralme <kuralme@protonmail.com>
This commit is contained in:
@@ -92,6 +92,11 @@ public:
|
||||
// copy assignment
|
||||
Subscription &operator=(const Subscription &other)
|
||||
{
|
||||
// Check for self-assignment
|
||||
if (this == &other) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
unsubscribe();
|
||||
_orb_id = other._orb_id;
|
||||
_instance = other._instance;
|
||||
|
||||
Reference in New Issue
Block a user