clang-tidy modernize-use-equals-delete

This commit is contained in:
Daniel Agar
2018-05-18 00:13:27 -04:00
committed by Lorenz Meier
parent 4e32cb17df
commit da5a9043a7
3 changed files with 95 additions and 102 deletions
+2 -2
View File
@@ -230,8 +230,8 @@ private:
virtual void _measure();
/* this class does not allow copying due to ptr data members */
ACCELSIM_mag(const ACCELSIM_mag &);
ACCELSIM_mag operator=(const ACCELSIM_mag &);
ACCELSIM_mag(const ACCELSIM_mag &) = delete;
ACCELSIM_mag operator=(const ACCELSIM_mag &) = delete;
};
+4 -9
View File
@@ -155,7 +155,6 @@ private:
float _accel_range_m_s2;
orb_advert_t _accel_topic;
int _accel_orb_class_instance;
int _accel_class_instance;
ringbuffer::RingBuffer *_gyro_reports;
@@ -172,8 +171,6 @@ private:
Integrator _accel_int;
Integrator _gyro_int;
enum Rotation _rotation;
// last temperature reading for print_info()
float _last_temperature;
@@ -245,8 +242,8 @@ private:
void _set_sample_rate(unsigned desired_sample_rate_hz);
/* do not allow to copy this class due to pointer data members */
GYROSIM(const GYROSIM &);
GYROSIM operator=(const GYROSIM &);
GYROSIM(const GYROSIM &) = delete;
GYROSIM operator=(const GYROSIM &) = delete;
#pragma pack(push, 1)
/**
@@ -295,8 +292,8 @@ private:
int _gyro_orb_class_instance;
/* do not allow to copy this class due to pointer data members */
GYROSIM_gyro(const GYROSIM_gyro &);
GYROSIM_gyro operator=(const GYROSIM_gyro &);
GYROSIM_gyro(const GYROSIM_gyro &) = delete;
GYROSIM_gyro operator=(const GYROSIM_gyro &) = delete;
};
/** driver 'main' command */
@@ -312,7 +309,6 @@ GYROSIM::GYROSIM(const char *path_accel, const char *path_gyro, enum Rotation ro
_accel_range_m_s2(0.0f),
_accel_topic(nullptr),
_accel_orb_class_instance(-1),
_accel_class_instance(-1),
_gyro_reports(nullptr),
_gyro_scale{},
_gyro_range_scale(0.0f),
@@ -324,7 +320,6 @@ GYROSIM::GYROSIM(const char *path_accel, const char *path_gyro, enum Rotation ro
_reset_retries(perf_alloc(PC_COUNT, "gyrosim_reset_retries")),
_accel_int(1000000 / GYROSIM_ACCEL_DEFAULT_RATE, true),
_gyro_int(1000000 / GYROSIM_GYRO_DEFAULT_RATE, true),
_rotation(rotation),
_last_temperature(0)
{