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