CI: enable clang-tidy cppcoreguidelines-virtual-class-destructor (#26559)

* CI: enable clang-tidy cppcoreguidelines-virtual-class-destructor

Signed-off-by: kuralme <kuralme@protonmail.com>

* format fix

Signed-off-by: kuralme <kuralme@protonmail.com>

---------

Signed-off-by: kuralme <kuralme@protonmail.com>
This commit is contained in:
Ege Kural
2026-02-23 23:21:20 -05:00
committed by GitHub
parent a4f9786c3d
commit 207456fd35
8 changed files with 29 additions and 11 deletions
+2 -2
View File
@@ -130,7 +130,7 @@ class ModeManagement : public ModeChangeHandler
{
public:
ModeManagement(ExternalChecks &external_checks);
~ModeManagement() = default;
virtual ~ModeManagement() = default;
struct UpdateRequest {
bool change_user_intended_nav_state{false};
@@ -202,7 +202,7 @@ class ModeManagement : public ModeChangeHandler
{
public:
ModeManagement() = default;
~ModeManagement() = default;
virtual ~ModeManagement() = default;
struct UpdateRequest {
bool change_user_intended_nav_state{false};
@@ -44,6 +44,17 @@ enum class ModeChangeSource {
class ModeChangeHandler
{
public:
ModeChangeHandler() = default;
virtual ~ModeChangeHandler() = default;
/**
* Explicitly disable copying/moving
*/
ModeChangeHandler(const ModeChangeHandler &) = delete;
ModeChangeHandler &operator=(const ModeChangeHandler &) = delete;
ModeChangeHandler(ModeChangeHandler &&) = delete;
ModeChangeHandler &operator=(ModeChangeHandler &&) = delete;
virtual void onUserIntendedNavStateChange(ModeChangeSource source, uint8_t user_intended_nav_state) = 0;
/**
@@ -64,6 +75,12 @@ public:
const HealthAndArmingChecks &health_and_arming_checks, ModeChangeHandler *handler);
~UserModeIntention() = default;
/**
* Explicitly disable copying/moving
*/
UserModeIntention(const UserModeIntention &) = delete;
UserModeIntention &operator=(const UserModeIntention &) = delete;
/**
* Change the user intended mode
* @param user_intended_nav_state new mode
@@ -134,10 +134,7 @@ public:
bool has_initialized() { return _has_initialized.load(); }
#endif
private:
SimulatorMavlink();
~SimulatorMavlink()
virtual ~SimulatorMavlink()
{
// free perf counters
perf_free(_perf_sim_delay);
@@ -156,6 +153,8 @@ private:
_instance = nullptr;
}
private:
SimulatorMavlink();
void check_failure_injections();