Merge "Fix google-explicit-constructor warnings in libhardware"
This commit is contained in:
commit
99d2543a12
12 changed files with 12 additions and 12 deletions
|
@ -34,7 +34,7 @@ class Camera {
|
|||
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>)
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace default_camera_hal {
|
|||
// camera device.
|
||||
class CameraHAL {
|
||||
public:
|
||||
CameraHAL(int num_cameras);
|
||||
explicit CameraHAL(int num_cameras);
|
||||
~CameraHAL();
|
||||
|
||||
// Camera Module Interface (see <hardware/camera_common.h>)
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace default_camera_hal {
|
|||
// metadata and logic about that device.
|
||||
class ExampleCamera : public Camera {
|
||||
public:
|
||||
ExampleCamera(int id);
|
||||
explicit ExampleCamera(int id);
|
||||
~ExampleCamera();
|
||||
|
||||
private:
|
||||
|
|
|
@ -48,7 +48,7 @@ public:
|
|||
class Autolock {
|
||||
Locker& locker;
|
||||
public:
|
||||
inline Autolock(Locker& locker) : locker(locker) { locker.lock(); }
|
||||
inline explicit Autolock(Locker& locker) : locker(locker) { locker.lock(); }
|
||||
inline ~Autolock() { locker.unlock(); }
|
||||
};
|
||||
inline Locker() { pthread_mutex_init(&mutex, 0); }
|
||||
|
|
|
@ -38,7 +38,7 @@ class SensorEventQueue {
|
|||
pthread_cond_t mSpaceAvailableCondition;
|
||||
|
||||
public:
|
||||
SensorEventQueue(int capacity);
|
||||
explicit SensorEventQueue(int capacity);
|
||||
~SensorEventQueue();
|
||||
|
||||
// Returns length of region, between zero and min(capacity, requestedLength). If there is any
|
||||
|
|
|
@ -38,7 +38,7 @@ class Camera {
|
|||
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>)
|
||||
|
|
|
@ -36,7 +36,7 @@ class CameraHAL;
|
|||
class HotplugThread : public android::Thread {
|
||||
|
||||
public:
|
||||
HotplugThread(CameraHAL *hal);
|
||||
explicit HotplugThread(CameraHAL *hal);
|
||||
~HotplugThread();
|
||||
|
||||
// Override below two methods for proper cleanup.
|
||||
|
|
|
@ -28,7 +28,7 @@ namespace usb_camera_hal {
|
|||
*/
|
||||
class UsbCamera : public Camera {
|
||||
public:
|
||||
UsbCamera(int id);
|
||||
explicit UsbCamera(int id);
|
||||
~UsbCamera();
|
||||
|
||||
private:
|
||||
|
|
|
@ -36,7 +36,7 @@ namespace tests {
|
|||
template <bool InfoQuirk = false>
|
||||
struct CameraModuleFixture {
|
||||
|
||||
CameraModuleFixture(int CameraID = -1) {
|
||||
explicit CameraModuleFixture(int CameraID = -1) {
|
||||
TEST_EXTENSION_FORKING_CONSTRUCTOR;
|
||||
|
||||
mCameraID = CameraID;
|
||||
|
|
|
@ -71,7 +71,7 @@ class CameraStreamFixture
|
|||
: public CameraModuleFixture</*InfoQuirk*/true> {
|
||||
|
||||
public:
|
||||
CameraStreamFixture(CameraStreamParams p)
|
||||
explicit CameraStreamFixture(CameraStreamParams p)
|
||||
: CameraModuleFixture(TestSettings::DeviceId()) {
|
||||
TEST_EXTENSION_FORKING_CONSTRUCTOR;
|
||||
|
||||
|
|
|
@ -166,7 +166,7 @@ class NotifierListener {
|
|||
*/
|
||||
class StreamAdapter: public camera2_stream_ops {
|
||||
public:
|
||||
StreamAdapter(sp<IGraphicBufferProducer> consumer);
|
||||
explicit StreamAdapter(sp<IGraphicBufferProducer> consumer);
|
||||
|
||||
~StreamAdapter();
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ decltype(auto) delay_async(Duration&& delay, Function&& task)
|
|||
*/
|
||||
class TempFile {
|
||||
public:
|
||||
TempFile(const char* path);
|
||||
explicit TempFile(const char* path);
|
||||
~TempFile();
|
||||
|
||||
// No copy or assign
|
||||
|
|
Loading…
Reference in a new issue