aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBin Chen <pierr.chen@gmail.com>2016-08-19 19:37:42 +1000
committerAlex Vakulenko <avakulenko@google.com>2016-08-23 15:00:41 +0000
commit4cfe4e853b4c1c296e0a2fb2d7e6a6777ed03559 (patch)
treefd9dd57b96fd9356b56c6b0f7e2e6b03f7500867
parent2cb1e573077fec79b80cafc66fdf11b6eef6c1ed (diff)
downloadperipheralmanager-4cfe4e853b4c1c296e0a2fb2d7e6a6777ed03559.tar.gz
Disable implicit conversion
According to Google coding style, need to add explicit keyword for single-argument constructors. Change-Id: I2673b5367e01b8cca9d908cf5fca96f4877e83d3 Signed-off-by: Bin Chen <pierr.chen@gmail.com>
-rw-r--r--daemon/gpio_driver.h2
-rw-r--r--daemon/gpio_driver_mock.h2
-rw-r--r--daemon/gpio_driver_sysfs.h2
-rw-r--r--daemon/gpio_manager.h2
-rw-r--r--daemon/i2c_driver.h2
-rw-r--r--daemon/i2c_driver_i2cdev.h2
-rw-r--r--daemon/i2c_manager.h2
-rw-r--r--daemon/led_driver.h2
-rw-r--r--daemon/led_driver_sysfs.h2
-rw-r--r--daemon/led_manager.h2
-rw-r--r--daemon/spi_driver.h2
-rw-r--r--daemon/spi_driver_spidev.h2
-rw-r--r--daemon/spi_manager.h2
-rw-r--r--daemon/uart_driver.h2
-rw-r--r--daemon/uart_driver_sysfs.h2
-rw-r--r--daemon/uart_manager.h2
16 files changed, 16 insertions, 16 deletions
diff --git a/daemon/gpio_driver.h b/daemon/gpio_driver.h
index 20dcbb1..084c0f3 100644
--- a/daemon/gpio_driver.h
+++ b/daemon/gpio_driver.h
@@ -60,7 +60,7 @@ class GpioDriverInfoBase {
template <class T, class PARAM>
class GpioDriverInfo : public GpioDriverInfoBase {
public:
- GpioDriverInfo(PARAM param) : param_(param) {}
+ explicit GpioDriverInfo(PARAM param) : param_(param) {}
~GpioDriverInfo() override {}
std::string Compat() override { return T::Compat(); }
diff --git a/daemon/gpio_driver_mock.h b/daemon/gpio_driver_mock.h
index d8e279c..f52b0f1 100644
--- a/daemon/gpio_driver_mock.h
+++ b/daemon/gpio_driver_mock.h
@@ -28,7 +28,7 @@ namespace android {
class GpioDriverMock : public GpioDriverInterface {
public:
- GpioDriverMock(void* arg) : is_input(true) {}
+ explicit GpioDriverMock(void* arg) : is_input(true) {}
~GpioDriverMock() {}
static std::string Compat() { return "GPIOSYSFS"; }
diff --git a/daemon/gpio_driver_sysfs.h b/daemon/gpio_driver_sysfs.h
index 21e33af..690066a 100644
--- a/daemon/gpio_driver_sysfs.h
+++ b/daemon/gpio_driver_sysfs.h
@@ -27,7 +27,7 @@ namespace android {
class GpioDriverSysfs : public GpioDriverInterface {
public:
- GpioDriverSysfs(void* arg);
+ explicit GpioDriverSysfs(void* arg);
~GpioDriverSysfs();
static std::string Compat() { return "GPIOSYSFS"; }
diff --git a/daemon/gpio_manager.h b/daemon/gpio_manager.h
index c691f26..52bd779 100644
--- a/daemon/gpio_manager.h
+++ b/daemon/gpio_manager.h
@@ -41,7 +41,7 @@ class GpioPin {
public:
// TODO(leecam): pins should have a generic device
// reference, not a sysfs one.
- GpioPin(GpioPinSysfs* pin) : pin_(pin) {}
+ explicit GpioPin(GpioPinSysfs* pin) : pin_(pin) {}
~GpioPin() {
if (!pin_->mux.empty()) {
PinMuxManager::GetPinMuxManager()->ReleaseGpio(pin_->mux);
diff --git a/daemon/i2c_driver.h b/daemon/i2c_driver.h
index 4b8c079..7eac065 100644
--- a/daemon/i2c_driver.h
+++ b/daemon/i2c_driver.h
@@ -68,7 +68,7 @@ class I2cDriverInfoBase {
template <class T, class PARAM>
class I2cDriverInfo : public I2cDriverInfoBase {
public:
- I2cDriverInfo(PARAM param) : param_(param) {}
+ explicit I2cDriverInfo(PARAM param) : param_(param) {}
~I2cDriverInfo() override {}
std::string Compat() override { return T::Compat(); }
diff --git a/daemon/i2c_driver_i2cdev.h b/daemon/i2c_driver_i2cdev.h
index ee9c1ce..8282b47 100644
--- a/daemon/i2c_driver_i2cdev.h
+++ b/daemon/i2c_driver_i2cdev.h
@@ -30,7 +30,7 @@ namespace android {
class I2cDriverI2cDev : public I2cDriverInterface {
public:
- I2cDriverI2cDev(CharDeviceFactory* char_device_factory);
+ explicit I2cDriverI2cDev(CharDeviceFactory* char_device_factory);
~I2cDriverI2cDev();
static std::string Compat() { return "I2CDEV"; }
diff --git a/daemon/i2c_manager.h b/daemon/i2c_manager.h
index e6011ae..5627b4d 100644
--- a/daemon/i2c_manager.h
+++ b/daemon/i2c_manager.h
@@ -33,7 +33,7 @@
namespace android {
struct I2cDevBus {
- I2cDevBus(uint32_t b) : bus(b) {}
+ explicit I2cDevBus(uint32_t b) : bus(b) {}
uint32_t bus;
std::string mux;
std::string mux_group;
diff --git a/daemon/led_driver.h b/daemon/led_driver.h
index 4dfc042..15c25e6 100644
--- a/daemon/led_driver.h
+++ b/daemon/led_driver.h
@@ -53,7 +53,7 @@ class LedDriverInfoBase {
template <class T, class PARAM>
class LedDriverInfo : public LedDriverInfoBase {
public:
- LedDriverInfo(PARAM param) : param_(param) {}
+ explicit LedDriverInfo(PARAM param) : param_(param) {}
~LedDriverInfo() override {}
std::string Compat() override { return T::Compat(); }
diff --git a/daemon/led_driver_sysfs.h b/daemon/led_driver_sysfs.h
index ef14717..c4c46fc 100644
--- a/daemon/led_driver_sysfs.h
+++ b/daemon/led_driver_sysfs.h
@@ -27,7 +27,7 @@ namespace android {
class LedDriverSysfs : public LedDriverInterface {
public:
- LedDriverSysfs(std::string* prefix);
+ explicit LedDriverSysfs(std::string* prefix);
~LedDriverSysfs();
static std::string Compat() { return "LEDSYSFS"; }
diff --git a/daemon/led_manager.h b/daemon/led_manager.h
index 66681e3..b6c93f9 100644
--- a/daemon/led_manager.h
+++ b/daemon/led_manager.h
@@ -39,7 +39,7 @@ struct LedSysfs {
class Led {
public:
- Led(LedSysfs* led) : led_(led) {}
+ explicit Led(LedSysfs* led) : led_(led) {}
~Led() {
if (!led_->mux.empty()) {
// TODO(leecam): Set up pin muxing
diff --git a/daemon/spi_driver.h b/daemon/spi_driver.h
index 700a169..44ecc90 100644
--- a/daemon/spi_driver.h
+++ b/daemon/spi_driver.h
@@ -55,7 +55,7 @@ class SpiDriverInfoBase {
template <class T, class PARAM>
class SpiDriverInfo : public SpiDriverInfoBase {
public:
- SpiDriverInfo(PARAM param) : param_(param) {}
+ explicit SpiDriverInfo(PARAM param) : param_(param) {}
~SpiDriverInfo() override {}
std::string Compat() override { return T::Compat(); }
diff --git a/daemon/spi_driver_spidev.h b/daemon/spi_driver_spidev.h
index f573fb0..67f3bd5 100644
--- a/daemon/spi_driver_spidev.h
+++ b/daemon/spi_driver_spidev.h
@@ -30,7 +30,7 @@ namespace android {
class SpiDriverSpiDev : public SpiDriverInterface {
public:
- SpiDriverSpiDev(CharDeviceFactory* char_device_factory);
+ explicit SpiDriverSpiDev(CharDeviceFactory* char_device_factory);
~SpiDriverSpiDev();
static std::string Compat() { return "SPIDEV"; }
diff --git a/daemon/spi_manager.h b/daemon/spi_manager.h
index deec13c..9ef51e3 100644
--- a/daemon/spi_manager.h
+++ b/daemon/spi_manager.h
@@ -43,7 +43,7 @@ struct SpiDevBus {
class SpiDevice {
public:
- SpiDevice(SpiDevBus* bus) : bus_(bus) {}
+ explicit SpiDevice(SpiDevBus* bus) : bus_(bus) {}
~SpiDevice() {
if (!bus_->mux.empty()) {
PinMuxManager::GetPinMuxManager()->ReleaseSource(bus_->mux,
diff --git a/daemon/uart_driver.h b/daemon/uart_driver.h
index c132391..e8d7ed7 100644
--- a/daemon/uart_driver.h
+++ b/daemon/uart_driver.h
@@ -55,7 +55,7 @@ class UartDriverInfoBase {
template <class T, class PARAM>
class UartDriverInfo : public UartDriverInfoBase {
public:
- UartDriverInfo(PARAM param) : param_(param) {}
+ explicit UartDriverInfo(PARAM param) : param_(param) {}
~UartDriverInfo() override {}
std::string Compat() override { return T::Compat(); }
diff --git a/daemon/uart_driver_sysfs.h b/daemon/uart_driver_sysfs.h
index c5e3e27..35085b7 100644
--- a/daemon/uart_driver_sysfs.h
+++ b/daemon/uart_driver_sysfs.h
@@ -28,7 +28,7 @@ namespace android {
class UartDriverSysfs : public UartDriverInterface {
public:
- UartDriverSysfs(CharDeviceFactory* factory);
+ explicit UartDriverSysfs(CharDeviceFactory* factory);
~UartDriverSysfs();
static std::string Compat() { return "UARTSYSFS"; }
diff --git a/daemon/uart_manager.h b/daemon/uart_manager.h
index eefa37f..ba8fa51 100644
--- a/daemon/uart_manager.h
+++ b/daemon/uart_manager.h
@@ -40,7 +40,7 @@ struct UartSysfs {
class UartDevice {
public:
- UartDevice(UartSysfs* uart_device) : uart_device_(uart_device) {}
+ explicit UartDevice(UartSysfs* uart_device) : uart_device_(uart_device) {}
~UartDevice() { uart_device_->driver_.reset(); }
int SetBaudrate(uint32_t baudrate) {