Fix google-explicit-constructor warnings in libhardware
Bug: 28341362
Change-Id: I29a56734e54740e4b15fe2f6cacbbd867163ae79
Test: build with clang-tidy
diff --git a/modules/usbcamera/Camera.h b/modules/usbcamera/Camera.h
index 6419c7d..4051345 100644
--- a/modules/usbcamera/Camera.h
+++ b/modules/usbcamera/Camera.h
@@ -38,7 +38,7 @@
public:
// id is used to distinguish cameras. 0 <= id < NUM_CAMERAS.
// module is a handle to the HAL module, used when the device is opened.
- Camera(int id);
+ explicit Camera(int id);
virtual ~Camera();
// Common Camera Device Operations (see <hardware/camera_common.h>)
diff --git a/modules/usbcamera/HotplugThread.h b/modules/usbcamera/HotplugThread.h
index a13adb7..625dcb4 100644
--- a/modules/usbcamera/HotplugThread.h
+++ b/modules/usbcamera/HotplugThread.h
@@ -36,7 +36,7 @@
class HotplugThread : public android::Thread {
public:
- HotplugThread(CameraHAL *hal);
+ explicit HotplugThread(CameraHAL *hal);
~HotplugThread();
// Override below two methods for proper cleanup.
diff --git a/modules/usbcamera/UsbCamera.h b/modules/usbcamera/UsbCamera.h
index fe52ade..57017fe 100644
--- a/modules/usbcamera/UsbCamera.h
+++ b/modules/usbcamera/UsbCamera.h
@@ -28,7 +28,7 @@
*/
class UsbCamera : public Camera {
public:
- UsbCamera(int id);
+ explicit UsbCamera(int id);
~UsbCamera();
private: