mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
clang-tidy modernize-use-equals-default
This commit is contained in:
parent
9b5df10631
commit
4e32cb17df
@ -12,9 +12,7 @@ CameraInterface::CameraInterface():
|
||||
{
|
||||
}
|
||||
|
||||
CameraInterface::~CameraInterface()
|
||||
{
|
||||
}
|
||||
CameraInterface::~CameraInterface() = default;
|
||||
|
||||
void CameraInterface::get_pins()
|
||||
{
|
||||
|
||||
@ -48,9 +48,7 @@ LidarLite::LidarLite() :
|
||||
{
|
||||
}
|
||||
|
||||
LidarLite::~LidarLite()
|
||||
{
|
||||
}
|
||||
LidarLite::~LidarLite() = default;
|
||||
|
||||
void LidarLite::set_minimum_distance(const float min)
|
||||
{
|
||||
|
||||
@ -51,7 +51,7 @@ BlockWaypointGuidance::BlockWaypointGuidance(SuperBlock *parent, const char *nam
|
||||
{
|
||||
}
|
||||
|
||||
BlockWaypointGuidance::~BlockWaypointGuidance() {};
|
||||
BlockWaypointGuidance::~BlockWaypointGuidance() = default;;
|
||||
|
||||
void BlockWaypointGuidance::update(
|
||||
const vehicle_global_position_s &pos,
|
||||
|
||||
@ -54,13 +54,9 @@ Integrator::Integrator(uint64_t auto_reset_interval, bool coning_compensation) :
|
||||
_last_delta_alpha(0.0f, 0.0f, 0.0f),
|
||||
_coning_comp_on(coning_compensation)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Integrator::~Integrator()
|
||||
{
|
||||
|
||||
}
|
||||
Integrator::~Integrator() = default;
|
||||
|
||||
bool
|
||||
Integrator::put(uint64_t timestamp, matrix::Vector3f &val, matrix::Vector3f &integral, uint64_t &integral_dt)
|
||||
|
||||
@ -72,9 +72,7 @@ LED::LED() : CDev("led", LED0_DEVICE_PATH)
|
||||
init();
|
||||
}
|
||||
|
||||
LED::~LED()
|
||||
{
|
||||
}
|
||||
LED::~LED() = default;
|
||||
|
||||
int
|
||||
LED::init()
|
||||
|
||||
@ -46,8 +46,8 @@
|
||||
class StateMachineHelperTest : public UnitTest
|
||||
{
|
||||
public:
|
||||
StateMachineHelperTest();
|
||||
virtual ~StateMachineHelperTest();
|
||||
StateMachineHelperTest() = default;
|
||||
virtual ~StateMachineHelperTest() = default;
|
||||
|
||||
virtual bool run_tests();
|
||||
|
||||
@ -57,12 +57,6 @@ private:
|
||||
bool isSafeTest();
|
||||
};
|
||||
|
||||
StateMachineHelperTest::StateMachineHelperTest() {
|
||||
}
|
||||
|
||||
StateMachineHelperTest::~StateMachineHelperTest() {
|
||||
}
|
||||
|
||||
bool StateMachineHelperTest::armingStateTransitionTest()
|
||||
{
|
||||
// These are the critical values from vehicle_status_s and actuator_armed_s which must be primed
|
||||
|
||||
@ -78,9 +78,7 @@ LandingTargetEstimator::LandingTargetEstimator() :
|
||||
_check_params(true);
|
||||
}
|
||||
|
||||
LandingTargetEstimator::~LandingTargetEstimator()
|
||||
{
|
||||
}
|
||||
LandingTargetEstimator::~LandingTargetEstimator() = default;
|
||||
|
||||
void LandingTargetEstimator::update()
|
||||
{
|
||||
|
||||
@ -404,7 +404,7 @@ protected:
|
||||
explicit MavlinkStreamStatustext(Mavlink *mavlink) : MavlinkStream(mavlink)
|
||||
{}
|
||||
|
||||
~MavlinkStreamStatustext() {}
|
||||
~MavlinkStreamStatustext() = default;
|
||||
|
||||
|
||||
bool send(const hrt_abstime t)
|
||||
|
||||
@ -48,9 +48,7 @@ MavlinkRateLimiter::MavlinkRateLimiter(unsigned int interval) : _last_sent(0), _
|
||||
{
|
||||
}
|
||||
|
||||
MavlinkRateLimiter::~MavlinkRateLimiter()
|
||||
{
|
||||
}
|
||||
MavlinkRateLimiter::~MavlinkRateLimiter() = default;
|
||||
|
||||
void
|
||||
MavlinkRateLimiter::set_interval(unsigned int interval)
|
||||
|
||||
@ -54,9 +54,7 @@
|
||||
#include <asm/socket.h>
|
||||
#endif
|
||||
|
||||
MavlinkShell::MavlinkShell()
|
||||
{
|
||||
}
|
||||
MavlinkShell::MavlinkShell() = default;
|
||||
|
||||
MavlinkShell::~MavlinkShell()
|
||||
{
|
||||
|
||||
@ -52,9 +52,7 @@ MavlinkStream::MavlinkStream(Mavlink *mavlink) :
|
||||
{
|
||||
}
|
||||
|
||||
MavlinkStream::~MavlinkStream()
|
||||
{
|
||||
}
|
||||
MavlinkStream::~MavlinkStream() = default;
|
||||
|
||||
/**
|
||||
* Set messages interval in ms
|
||||
|
||||
@ -65,10 +65,7 @@ MavlinkFtpTest::MavlinkFtpTest() :
|
||||
{
|
||||
}
|
||||
|
||||
MavlinkFtpTest::~MavlinkFtpTest()
|
||||
{
|
||||
|
||||
}
|
||||
MavlinkFtpTest::~MavlinkFtpTest() = default;
|
||||
|
||||
/// @brief Called before every test to initialize the FTP Server.
|
||||
void MavlinkFtpTest::_init()
|
||||
|
||||
@ -58,8 +58,8 @@ public:
|
||||
class McPosControlTests : public UnitTest
|
||||
{
|
||||
public:
|
||||
McPosControlTests();
|
||||
virtual ~McPosControlTests();
|
||||
McPosControlTests() = default;
|
||||
virtual ~McPosControlTests() = default;
|
||||
|
||||
virtual bool run_tests();
|
||||
|
||||
@ -67,14 +67,6 @@ private:
|
||||
bool cross_sphere_line_test();
|
||||
};
|
||||
|
||||
McPosControlTests::McPosControlTests()
|
||||
{
|
||||
}
|
||||
|
||||
McPosControlTests::~McPosControlTests()
|
||||
{
|
||||
}
|
||||
|
||||
bool McPosControlTests::cross_sphere_line_test()
|
||||
{
|
||||
MulticopterPositionControl control = MulticopterPositionControl();
|
||||
|
||||
@ -136,8 +136,7 @@ class Sensors : public ModuleBase<Sensors>, public ModuleParams
|
||||
{
|
||||
public:
|
||||
Sensors(bool hil_enabled);
|
||||
|
||||
~Sensors() {}
|
||||
~Sensors() = default;
|
||||
|
||||
/** @see ModuleBase */
|
||||
static int task_spawn(int argc, char *argv[]);
|
||||
|
||||
@ -973,9 +973,7 @@ ACCELSIM_mag::ACCELSIM_mag(ACCELSIM *parent) :
|
||||
m_id.dev_id_s.devtype = DRV_ACC_DEVTYPE_ACCELSIM;
|
||||
}
|
||||
|
||||
ACCELSIM_mag::~ACCELSIM_mag()
|
||||
{
|
||||
}
|
||||
ACCELSIM_mag::~ACCELSIM_mag() = default;
|
||||
|
||||
ssize_t
|
||||
ACCELSIM_mag::devRead(void *buffer, size_t buflen)
|
||||
|
||||
@ -278,7 +278,7 @@ class GYROSIM_gyro : public VirtDevObj
|
||||
{
|
||||
public:
|
||||
GYROSIM_gyro(GYROSIM *parent, const char *path);
|
||||
virtual ~GYROSIM_gyro() {}
|
||||
virtual ~GYROSIM_gyro() = default;
|
||||
|
||||
virtual ssize_t devRead(void *buffer, size_t buflen);
|
||||
virtual int devIOCTL(unsigned long cmd, unsigned long arg);
|
||||
|
||||
@ -63,7 +63,7 @@ class LED : public VirtDevObj
|
||||
{
|
||||
public:
|
||||
LED();
|
||||
virtual ~LED();
|
||||
virtual ~LED() = default;
|
||||
|
||||
virtual int init();
|
||||
virtual int devIOCTL(unsigned long cmd, unsigned long arg);
|
||||
@ -79,10 +79,6 @@ LED::LED() :
|
||||
init();
|
||||
}
|
||||
|
||||
LED::~LED()
|
||||
{
|
||||
}
|
||||
|
||||
int
|
||||
LED::init()
|
||||
{
|
||||
|
||||
@ -70,9 +70,7 @@ Standard::Standard(VtolAttitudeControl *attc) :
|
||||
_params_handles_standard.reverse_delay = param_find("VT_B_REV_DEL");
|
||||
}
|
||||
|
||||
Standard::~Standard()
|
||||
{
|
||||
}
|
||||
Standard::~Standard() = default;
|
||||
|
||||
void
|
||||
Standard::parameters_update()
|
||||
|
||||
@ -65,10 +65,7 @@ Tailsitter::Tailsitter(VtolAttitudeControl *attc) :
|
||||
_params_handles_tailsitter.front_trans_dur_p2 = param_find("VT_TRANS_P2_DUR");
|
||||
}
|
||||
|
||||
Tailsitter::~Tailsitter()
|
||||
{
|
||||
|
||||
}
|
||||
Tailsitter::~Tailsitter() = default;
|
||||
|
||||
void
|
||||
Tailsitter::parameters_update()
|
||||
|
||||
@ -65,10 +65,7 @@ Tiltrotor::Tiltrotor(VtolAttitudeControl *attc) :
|
||||
_params_handles_tiltrotor.diff_thrust_scale = param_find("VT_FW_DIFTHR_SC");
|
||||
}
|
||||
|
||||
Tiltrotor::~Tiltrotor()
|
||||
{
|
||||
|
||||
}
|
||||
Tiltrotor::~Tiltrotor() = default;
|
||||
|
||||
void
|
||||
Tiltrotor::parameters_update()
|
||||
|
||||
@ -76,10 +76,7 @@ VtolType::VtolType(VtolAttitudeControl *att_controller) :
|
||||
}
|
||||
}
|
||||
|
||||
VtolType::~VtolType()
|
||||
{
|
||||
|
||||
}
|
||||
VtolType::~VtolType() = default;
|
||||
|
||||
bool VtolType::init()
|
||||
{
|
||||
|
||||
@ -94,7 +94,7 @@ class PrivData
|
||||
{
|
||||
public:
|
||||
PrivData() : _read_offset(0) {}
|
||||
~PrivData() {}
|
||||
~PrivData() = default;
|
||||
|
||||
size_t _read_offset;
|
||||
};
|
||||
@ -107,7 +107,7 @@ public:
|
||||
_is_open_for_write(false),
|
||||
_write_offset(0) {}
|
||||
|
||||
~VCDevNode() {}
|
||||
~VCDevNode() = default;
|
||||
|
||||
virtual int open(device::file_t *handlep);
|
||||
virtual int close(device::file_t *handlep);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user