mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-01 07:31:36 +08:00
c++11 default destructors
This commit is contained in:
@@ -194,9 +194,7 @@ BMP280::~BMP280()
|
||||
int
|
||||
BMP280::init()
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = CDev::init();
|
||||
int ret = CDev::init();
|
||||
|
||||
if (ret != OK) {
|
||||
DEVICE_DEBUG("CDev init failed");
|
||||
|
||||
@@ -67,9 +67,8 @@ class LPS25H_I2C : public device::I2C
|
||||
{
|
||||
public:
|
||||
LPS25H_I2C(int bus);
|
||||
virtual ~LPS25H_I2C();
|
||||
virtual ~LPS25H_I2C() = default;
|
||||
|
||||
virtual int init();
|
||||
virtual int read(unsigned address, void *data, unsigned count);
|
||||
virtual int write(unsigned address, void *data, unsigned count);
|
||||
|
||||
@@ -91,17 +90,6 @@ LPS25H_I2C::LPS25H_I2C(int bus) :
|
||||
{
|
||||
}
|
||||
|
||||
LPS25H_I2C::~LPS25H_I2C()
|
||||
{
|
||||
}
|
||||
|
||||
int
|
||||
LPS25H_I2C::init()
|
||||
{
|
||||
/* this will call probe() */
|
||||
return I2C::init();
|
||||
}
|
||||
|
||||
int
|
||||
LPS25H_I2C::ioctl(unsigned operation, unsigned &arg)
|
||||
{
|
||||
|
||||
@@ -73,7 +73,7 @@ class LPS25H_SPI : public device::SPI
|
||||
{
|
||||
public:
|
||||
LPS25H_SPI(int bus, uint32_t device);
|
||||
virtual ~LPS25H_SPI();
|
||||
virtual ~LPS25H_SPI() = default;
|
||||
|
||||
virtual int init();
|
||||
virtual int read(unsigned address, void *data, unsigned count);
|
||||
@@ -95,10 +95,6 @@ LPS25H_SPI::LPS25H_SPI(int bus, uint32_t device) :
|
||||
_device_id.devid_s.devtype = DRV_MAG_DEVTYPE_LPS25H;
|
||||
}
|
||||
|
||||
LPS25H_SPI::~LPS25H_SPI()
|
||||
{
|
||||
}
|
||||
|
||||
int
|
||||
LPS25H_SPI::init()
|
||||
{
|
||||
|
||||
@@ -64,7 +64,7 @@ class MPL3115A2_I2C : public device::I2C
|
||||
{
|
||||
public:
|
||||
MPL3115A2_I2C(uint8_t bus);
|
||||
virtual ~MPL3115A2_I2C();
|
||||
virtual ~MPL3115A2_I2C() = default;
|
||||
|
||||
virtual int init();
|
||||
virtual int read(unsigned offset, void *data, unsigned count);
|
||||
@@ -99,10 +99,6 @@ MPL3115A2_I2C::MPL3115A2_I2C(uint8_t bus) :
|
||||
{
|
||||
}
|
||||
|
||||
MPL3115A2_I2C::~MPL3115A2_I2C()
|
||||
{
|
||||
}
|
||||
|
||||
int
|
||||
MPL3115A2_I2C::init()
|
||||
{
|
||||
|
||||
@@ -67,9 +67,8 @@ class MS5611_I2C : public device::I2C
|
||||
{
|
||||
public:
|
||||
MS5611_I2C(uint8_t bus, ms5611::prom_u &prom_buf);
|
||||
virtual ~MS5611_I2C();
|
||||
virtual ~MS5611_I2C() = default;
|
||||
|
||||
virtual int init();
|
||||
virtual int read(unsigned offset, void *data, unsigned count);
|
||||
virtual int ioctl(unsigned operation, unsigned &arg);
|
||||
|
||||
@@ -116,17 +115,6 @@ MS5611_I2C::MS5611_I2C(uint8_t bus, ms5611::prom_u &prom) :
|
||||
{
|
||||
}
|
||||
|
||||
MS5611_I2C::~MS5611_I2C()
|
||||
{
|
||||
}
|
||||
|
||||
int
|
||||
MS5611_I2C::init()
|
||||
{
|
||||
/* this will call probe(), and thereby _probe_address */
|
||||
return I2C::init();
|
||||
}
|
||||
|
||||
int
|
||||
MS5611_I2C::read(unsigned offset, void *data, unsigned count)
|
||||
{
|
||||
|
||||
@@ -67,7 +67,7 @@ class MS5611_SPI : public device::SPI
|
||||
{
|
||||
public:
|
||||
MS5611_SPI(uint8_t bus, uint32_t device, ms5611::prom_u &prom_buf);
|
||||
virtual ~MS5611_SPI();
|
||||
virtual ~MS5611_SPI() = default;
|
||||
|
||||
virtual int init();
|
||||
virtual int read(unsigned offset, void *data, unsigned count);
|
||||
@@ -136,10 +136,6 @@ MS5611_SPI::MS5611_SPI(uint8_t bus, uint32_t device, ms5611::prom_u &prom_buf) :
|
||||
{
|
||||
}
|
||||
|
||||
MS5611_SPI::~MS5611_SPI()
|
||||
{
|
||||
}
|
||||
|
||||
int
|
||||
MS5611_SPI::init()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user