clang-tidy: partially fix hicpp-use-equals-delete

This commit is contained in:
Daniel Agar
2019-10-27 19:19:07 -04:00
parent d545825bf0
commit 279df3b1b8
9 changed files with 81 additions and 32 deletions
+6 -2
View File
@@ -59,6 +59,12 @@ class __EXPORT I2C : public CDev
public:
// no copy, assignment, move, move assignment
I2C(const I2C &) = delete;
I2C &operator=(const I2C &) = delete;
I2C(I2C &&) = delete;
I2C &operator=(I2C &&) = delete;
virtual int init();
static int set_bus_clock(unsigned bus, unsigned clock_hz);
@@ -109,8 +115,6 @@ private:
uint32_t _frequency{0};
px4_i2c_dev_t *_dev{nullptr};
I2C(const device::I2C &);
I2C operator=(const device::I2C &);
};
} // namespace device
+7 -4
View File
@@ -50,6 +50,13 @@ namespace device __EXPORT
*/
class __EXPORT SPI : public CDev
{
public:
// no copy, assignment, move, move assignment
SPI(const SPI &) = delete;
SPI &operator=(const SPI &) = delete;
SPI(SPI &&) = delete;
SPI &operator=(SPI &&) = delete;
protected:
/**
* Constructor
@@ -152,10 +159,6 @@ private:
LockMode _locking_mode{LOCK_THREADS}; /**< selected locking mode */
/* this class does not allow copying */
SPI(const SPI &);
SPI operator=(const SPI &);
protected:
int _transfer(uint8_t *send, uint8_t *recv, unsigned len);