mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-13 04:20:35 +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
|
||||
|
||||
Reference in New Issue
Block a user