mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-29 14:40:36 +08:00
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:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user