diff --git a/src/drivers/camera_trigger/interfaces/src/camera_interface.cpp b/src/drivers/camera_trigger/interfaces/src/camera_interface.cpp index b1d27f5e4b7e1c1c13b465cc7850d01fc3f5dfd5..18f8ac80133b697d858b87084f0b5543b57406b1 100644 --- a/src/drivers/camera_trigger/interfaces/src/camera_interface.cpp +++ b/src/drivers/camera_trigger/interfaces/src/camera_interface.cpp @@ -12,9 +12,7 @@ CameraInterface::CameraInterface(): { } -CameraInterface::~CameraInterface() -{ -} +CameraInterface::~CameraInterface() = default; void CameraInterface::get_pins() { diff --git a/src/drivers/distance_sensor/ll40ls/LidarLite.cpp b/src/drivers/distance_sensor/ll40ls/LidarLite.cpp index 657376091d3c67df33754ab41876a916f4b0fcdd..3a6707e6f956cd34ae4738f4d5f83a6ddfbfc440 100644 --- a/src/drivers/distance_sensor/ll40ls/LidarLite.cpp +++ b/src/drivers/distance_sensor/ll40ls/LidarLite.cpp @@ -48,9 +48,7 @@ LidarLite::LidarLite() : { } -LidarLite::~LidarLite() -{ -} +LidarLite::~LidarLite() = default; void LidarLite::set_minimum_distance(const float min) { diff --git a/src/examples/segway/blocks.cpp b/src/examples/segway/blocks.cpp index 4874ba3471f38d09e8d2eca354367b2990c65068..b751137da02009a2391071ac3e841f5ce13f912c 100644 --- a/src/examples/segway/blocks.cpp +++ b/src/examples/segway/blocks.cpp @@ -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, diff --git a/src/lib/drivers/device/integrator.cpp b/src/lib/drivers/device/integrator.cpp index 2835906b9163d1ae15777b7dc7337cedb90c4a5f..9adb1f95b84c5aebb436da020038b086801ace16 100644 --- a/src/lib/drivers/device/integrator.cpp +++ b/src/lib/drivers/device/integrator.cpp @@ -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) diff --git a/src/lib/drivers/led/led.cpp b/src/lib/drivers/led/led.cpp index 41e8488251b01768f8a180e894c071549addae0b..f0d928538ab728644d5950f397b2fab386201a2e 100644 --- a/src/lib/drivers/led/led.cpp +++ b/src/lib/drivers/led/led.cpp @@ -72,9 +72,7 @@ LED::LED() : CDev("led", LED0_DEVICE_PATH) init(); } -LED::~LED() -{ -} +LED::~LED() = default; int LED::init() diff --git a/src/modules/commander/commander_tests/state_machine_helper_test.cpp b/src/modules/commander/commander_tests/state_machine_helper_test.cpp index 8f13d812c189b527b94a0bb92cb2c04e1d88f15e..b1053afb3f0668e12c7febe5632cbb3d38965f3d 100644 --- a/src/modules/commander/commander_tests/state_machine_helper_test.cpp +++ b/src/modules/commander/commander_tests/state_machine_helper_test.cpp @@ -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 diff --git a/src/modules/landing_target_estimator/LandingTargetEstimator.cpp b/src/modules/landing_target_estimator/LandingTargetEstimator.cpp index 05ecc94f0d596467d33dbe372a1f0e1b12987bb1..6eb60127eb5eecc63d9dd63b767201a733b55964 100644 --- a/src/modules/landing_target_estimator/LandingTargetEstimator.cpp +++ b/src/modules/landing_target_estimator/LandingTargetEstimator.cpp @@ -78,9 +78,7 @@ LandingTargetEstimator::LandingTargetEstimator() : _check_params(true); } -LandingTargetEstimator::~LandingTargetEstimator() -{ -} +LandingTargetEstimator::~LandingTargetEstimator() = default; void LandingTargetEstimator::update() { diff --git a/src/modules/mavlink/mavlink_messages.cpp b/src/modules/mavlink/mavlink_messages.cpp index 60748a76af02796872cf75c1ba0c5de4bcdd34e1..b67d27a18dabc5a703bb69744f5d85950c611ad6 100644 --- a/src/modules/mavlink/mavlink_messages.cpp +++ b/src/modules/mavlink/mavlink_messages.cpp @@ -404,7 +404,7 @@ protected: explicit MavlinkStreamStatustext(Mavlink *mavlink) : MavlinkStream(mavlink) {} - ~MavlinkStreamStatustext() {} + ~MavlinkStreamStatustext() = default; bool send(const hrt_abstime t) diff --git a/src/modules/mavlink/mavlink_rate_limiter.cpp b/src/modules/mavlink/mavlink_rate_limiter.cpp index d3b3e1cde39f01525589d813cee00dc2b00fa9e2..6ca66029196c4f9bbe81546ce413e401f2022612 100644 --- a/src/modules/mavlink/mavlink_rate_limiter.cpp +++ b/src/modules/mavlink/mavlink_rate_limiter.cpp @@ -48,9 +48,7 @@ MavlinkRateLimiter::MavlinkRateLimiter(unsigned int interval) : _last_sent(0), _ { } -MavlinkRateLimiter::~MavlinkRateLimiter() -{ -} +MavlinkRateLimiter::~MavlinkRateLimiter() = default; void MavlinkRateLimiter::set_interval(unsigned int interval) diff --git a/src/modules/mavlink/mavlink_shell.cpp b/src/modules/mavlink/mavlink_shell.cpp index 1b0af87dfb1c339827bfba99f80d656331692c24..df4e31a1e9b0f55aece539e9ab6a71682f20f258 100644 --- a/src/modules/mavlink/mavlink_shell.cpp +++ b/src/modules/mavlink/mavlink_shell.cpp @@ -54,9 +54,7 @@ #include <asm/socket.h> #endif -MavlinkShell::MavlinkShell() -{ -} +MavlinkShell::MavlinkShell() = default; MavlinkShell::~MavlinkShell() { diff --git a/src/modules/mavlink/mavlink_stream.cpp b/src/modules/mavlink/mavlink_stream.cpp index 34a134e8d82a6281b51f600cb53d87c79a99b1b7..21d318a542319d74e52cd068b7d9820e3b5d8eef 100644 --- a/src/modules/mavlink/mavlink_stream.cpp +++ b/src/modules/mavlink/mavlink_stream.cpp @@ -52,9 +52,7 @@ MavlinkStream::MavlinkStream(Mavlink *mavlink) : { } -MavlinkStream::~MavlinkStream() -{ -} +MavlinkStream::~MavlinkStream() = default; /** * Set messages interval in ms diff --git a/src/modules/mavlink/mavlink_tests/mavlink_ftp_test.cpp b/src/modules/mavlink/mavlink_tests/mavlink_ftp_test.cpp index d5ed691af186048a28faea918a78134ca8da432f..3b44b2504fa61263ee326ba9c2e39fa3e93aecf8 100644 --- a/src/modules/mavlink/mavlink_tests/mavlink_ftp_test.cpp +++ b/src/modules/mavlink/mavlink_tests/mavlink_ftp_test.cpp @@ -65,10 +65,7 @@ MavlinkFtpTest::MavlinkFtpTest() : { } -MavlinkFtpTest::~MavlinkFtpTest() -{ - -} +MavlinkFtpTest::~MavlinkFtpTest() = default; /// @brief Called before every test to initialize the FTP Server. void MavlinkFtpTest::_init() diff --git a/src/modules/mc_pos_control/mc_pos_control_tests/mc_pos_control_tests.cpp b/src/modules/mc_pos_control/mc_pos_control_tests/mc_pos_control_tests.cpp index 38ac05a0e76637bd6beb5779f99aa685818ffef1..7f8999b7da632fc102a75b7811aa1ee902e5f2f7 100644 --- a/src/modules/mc_pos_control/mc_pos_control_tests/mc_pos_control_tests.cpp +++ b/src/modules/mc_pos_control/mc_pos_control_tests/mc_pos_control_tests.cpp @@ -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(); diff --git a/src/modules/sensors/sensors.cpp b/src/modules/sensors/sensors.cpp index 8f8d36804eb7a3385ff2f381a0b07844191da55e..2e72bf7c5bad62f7463000df4cc2661dae4e9c91 100644 --- a/src/modules/sensors/sensors.cpp +++ b/src/modules/sensors/sensors.cpp @@ -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[]); diff --git a/src/modules/simulator/accelsim/accelsim.cpp b/src/modules/simulator/accelsim/accelsim.cpp index 736d4c4c4eceb597ca4bb51b0994b3dba46276f0..1b3101f4ef6e3dab83ec76ecf9fc4cb8f6154fe1 100644 --- a/src/modules/simulator/accelsim/accelsim.cpp +++ b/src/modules/simulator/accelsim/accelsim.cpp @@ -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) diff --git a/src/modules/simulator/gyrosim/gyrosim.cpp b/src/modules/simulator/gyrosim/gyrosim.cpp index a26e41f01c7e5369cefe9be2705670885b56641b..9cc85e865de51bf9a70989f10dce4955771c6fe1 100644 --- a/src/modules/simulator/gyrosim/gyrosim.cpp +++ b/src/modules/simulator/gyrosim/gyrosim.cpp @@ -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); diff --git a/src/modules/simulator/ledsim/led.cpp b/src/modules/simulator/ledsim/led.cpp index c15f5a756778327c3d8376fe24b6e8cf4ff46d6b..0fb91421b130fa6eab19a182d34198b11cacc1d1 100644 --- a/src/modules/simulator/ledsim/led.cpp +++ b/src/modules/simulator/ledsim/led.cpp @@ -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() { diff --git a/src/modules/vtol_att_control/standard.cpp b/src/modules/vtol_att_control/standard.cpp index e1f6b902b24425d9d532db83cfc035e8062bed70..7565ce37eff7931079845eb3ac9ee0f6a22ea9c9 100644 --- a/src/modules/vtol_att_control/standard.cpp +++ b/src/modules/vtol_att_control/standard.cpp @@ -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() diff --git a/src/modules/vtol_att_control/tailsitter.cpp b/src/modules/vtol_att_control/tailsitter.cpp index 4dd91784078b4efbbfe7ff99180f2a851a2b15e9..9d92b932dda3a43eee1b2736bb2a4d9da5e33c51 100644 --- a/src/modules/vtol_att_control/tailsitter.cpp +++ b/src/modules/vtol_att_control/tailsitter.cpp @@ -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() diff --git a/src/modules/vtol_att_control/tiltrotor.cpp b/src/modules/vtol_att_control/tiltrotor.cpp index 87be8c24392769b2a00cf953c062eecd1e5f388f..01695c112c65a152bd57d1aa81b9def46a55dee4 100644 --- a/src/modules/vtol_att_control/tiltrotor.cpp +++ b/src/modules/vtol_att_control/tiltrotor.cpp @@ -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() diff --git a/src/modules/vtol_att_control/vtol_type.cpp b/src/modules/vtol_att_control/vtol_type.cpp index 4c8893f35dcafee22748ffad439ab4de9dce8f2e..803aadbd72ccf20b15bbc91322879ec6e63f2485 100644 --- a/src/modules/vtol_att_control/vtol_type.cpp +++ b/src/modules/vtol_att_control/vtol_type.cpp @@ -76,10 +76,7 @@ VtolType::VtolType(VtolAttitudeControl *att_controller) : } } -VtolType::~VtolType() -{ - -} +VtolType::~VtolType() = default; bool VtolType::init() { diff --git a/src/platforms/posix/tests/vcdev_test/vcdevtest_example.cpp b/src/platforms/posix/tests/vcdev_test/vcdevtest_example.cpp index ad9e974a6fb015b8dc455fa2f05f32d2baaf3d84..cafa7896e3916d98d82d6342eddb40f37fc673ec 100644 --- a/src/platforms/posix/tests/vcdev_test/vcdevtest_example.cpp +++ b/src/platforms/posix/tests/vcdev_test/vcdevtest_example.cpp @@ -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);