diff options
author | 2016-05-03 14:03:27 -0700 | |
---|---|---|
committer | 2016-05-03 17:55:04 -0700 | |
commit | c406791ead6d864ec693ad01a80c5f471bdc2a7a (patch) | |
tree | 16df8cb3e881d21fd5b233ec3f233f7a292d900f | |
parent | 6fa789211e0d2d0a488bdade34f19b5ea6e5923b (diff) |
Fix google-explicit-constructor warnings.
Bug: 28341362
Change-Id: I7e061f68acdde368a3b63c029b928133646ebff2
-rw-r--r-- | libs/binder/IMediaResourceMonitor.cpp | 2 | ||||
-rw-r--r-- | libs/binder/IResultReceiver.cpp | 2 | ||||
-rw-r--r-- | services/surfaceflinger/DispSync.cpp | 2 | ||||
-rw-r--r-- | services/surfaceflinger/DisplayHardware/HWC2On1Adapter.cpp | 2 | ||||
-rw-r--r-- | services/surfaceflinger/DisplayHardware/HWComposer_hwc1.cpp | 2 | ||||
-rw-r--r-- | services/surfaceflinger/GpuService.cpp | 2 | ||||
-rw-r--r-- | services/surfaceflinger/RenderEngine/RenderEngine.cpp | 8 | ||||
-rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 6 | ||||
-rw-r--r-- | services/surfaceflinger/SurfaceFlinger_hwc1.cpp | 6 | ||||
-rw-r--r-- | vulkan/libvulkan/layers_extensions.cpp | 2 |
10 files changed, 17 insertions, 17 deletions
diff --git a/libs/binder/IMediaResourceMonitor.cpp b/libs/binder/IMediaResourceMonitor.cpp index 4800f5ba61..77e3d239bc 100644 --- a/libs/binder/IMediaResourceMonitor.cpp +++ b/libs/binder/IMediaResourceMonitor.cpp @@ -25,7 +25,7 @@ namespace android { class BpMediaResourceMonitor : public BpInterface<IMediaResourceMonitor> { public: - BpMediaResourceMonitor(const sp<IBinder>& impl) + explicit BpMediaResourceMonitor(const sp<IBinder>& impl) : BpInterface<IMediaResourceMonitor>(impl) {} virtual void notifyResourceGranted(/*in*/ int32_t pid, /*in*/ const int32_t type) diff --git a/libs/binder/IResultReceiver.cpp b/libs/binder/IResultReceiver.cpp index 2a22b69957..646809e089 100644 --- a/libs/binder/IResultReceiver.cpp +++ b/libs/binder/IResultReceiver.cpp @@ -31,7 +31,7 @@ namespace android { class BpResultReceiver : public BpInterface<IResultReceiver> { public: - BpResultReceiver(const sp<IBinder>& impl) + explicit BpResultReceiver(const sp<IBinder>& impl) : BpInterface<IResultReceiver>(impl) { } diff --git a/services/surfaceflinger/DispSync.cpp b/services/surfaceflinger/DispSync.cpp index 37b642015f..d438f2c69f 100644 --- a/services/surfaceflinger/DispSync.cpp +++ b/services/surfaceflinger/DispSync.cpp @@ -64,7 +64,7 @@ static const int64_t kPresentTimeOffset = PRESENT_TIME_OFFSET_FROM_VSYNC_NS; class DispSyncThread: public Thread { public: - DispSyncThread(const char* name): + explicit DispSyncThread(const char* name): mName(name), mStop(false), mPeriod(0), diff --git a/services/surfaceflinger/DisplayHardware/HWC2On1Adapter.cpp b/services/surfaceflinger/DisplayHardware/HWC2On1Adapter.cpp index 6ebcdfeba6..aa45725c61 100644 --- a/services/surfaceflinger/DisplayHardware/HWC2On1Adapter.cpp +++ b/services/surfaceflinger/DisplayHardware/HWC2On1Adapter.cpp @@ -91,7 +91,7 @@ void HWC2On1Adapter::DisplayContentsDeleter::operator()( class HWC2On1Adapter::Callbacks : public hwc_procs_t { public: - Callbacks(HWC2On1Adapter& adapter) : mAdapter(adapter) { + explicit Callbacks(HWC2On1Adapter& adapter) : mAdapter(adapter) { invalidate = &invalidateHook; vsync = &vsyncHook; hotplug = &hotplugHook; diff --git a/services/surfaceflinger/DisplayHardware/HWComposer_hwc1.cpp b/services/surfaceflinger/DisplayHardware/HWComposer_hwc1.cpp index 4afd8a2dce..9d92f61047 100644 --- a/services/surfaceflinger/DisplayHardware/HWComposer_hwc1.cpp +++ b/services/surfaceflinger/DisplayHardware/HWComposer_hwc1.cpp @@ -926,7 +926,7 @@ class Iterable : public HWComposer::HWCLayer { protected: HWCTYPE* const mLayerList; HWCTYPE* mCurrentLayer; - Iterable(HWCTYPE* layer) : mLayerList(layer), mCurrentLayer(layer), + explicit Iterable(HWCTYPE* layer) : mLayerList(layer), mCurrentLayer(layer), mIndex(0) { } inline HWCTYPE const * getLayer() const { return mCurrentLayer; } inline HWCTYPE* getLayer() { return mCurrentLayer; } diff --git a/services/surfaceflinger/GpuService.cpp b/services/surfaceflinger/GpuService.cpp index 0c2997191c..d93f8458b0 100644 --- a/services/surfaceflinger/GpuService.cpp +++ b/services/surfaceflinger/GpuService.cpp @@ -27,7 +27,7 @@ namespace android { class BpGpuService : public BpInterface<IGpuService> { public: - BpGpuService(const sp<IBinder>& impl) : BpInterface<IGpuService>(impl) {} + explicit BpGpuService(const sp<IBinder>& impl) : BpInterface<IGpuService>(impl) {} }; IMPLEMENT_META_INTERFACE(GpuService, "android.ui.IGpuService"); diff --git a/services/surfaceflinger/RenderEngine/RenderEngine.cpp b/services/surfaceflinger/RenderEngine/RenderEngine.cpp index 27357b91cc..c9400696ba 100644 --- a/services/surfaceflinger/RenderEngine/RenderEngine.cpp +++ b/services/surfaceflinger/RenderEngine/RenderEngine.cpp @@ -317,7 +317,7 @@ class EGLAttributeVector { KeyedVector<Attribute, EGLint> mList; struct Attribute { Attribute() : v(0) {}; - Attribute(EGLint v) : v(v) { } + explicit Attribute(EGLint v) : v(v) { } EGLint v; bool operator < (const Attribute& other) const { // this places EGL_NONE at the end @@ -338,18 +338,18 @@ class EGLAttributeVector { public: void operator = (EGLint value) { if (attribute != EGL_NONE) { - v.mList.add(attribute, value); + v.mList.add(Attribute(attribute), value); } } operator EGLint () const { return v.mList[attribute]; } }; public: EGLAttributeVector() { - mList.add(EGL_NONE, EGL_NONE); + mList.add(Attribute(EGL_NONE), EGL_NONE); } void remove(EGLint attribute) { if (attribute != EGL_NONE) { - mList.removeItem(attribute); + mList.removeItem(Attribute(attribute)); } } Adder operator [] (EGLint attribute) { diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index a69b11b0c3..2e17bf7017 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -231,7 +231,7 @@ sp<IBinder> SurfaceFlinger::createDisplay(const String8& displayName, flinger->setTransactionFlags(eDisplayTransactionNeeded); } public: - DisplayToken(const sp<SurfaceFlinger>& flinger) + explicit DisplayToken(const sp<SurfaceFlinger>& flinger) : flinger(flinger) { } }; @@ -2450,7 +2450,7 @@ void SurfaceFlinger::initializeDisplays() { class MessageScreenInitialized : public MessageBase { SurfaceFlinger* flinger; public: - MessageScreenInitialized(SurfaceFlinger* flinger) : flinger(flinger) { } + explicit MessageScreenInitialized(SurfaceFlinger* flinger) : flinger(flinger) { } virtual bool handler() { flinger->onInitializeDisplays(); return true; @@ -3167,7 +3167,7 @@ class GraphicProducerWrapper : public BBinder, public MessageHandler { } public: - GraphicProducerWrapper(const sp<IGraphicBufferProducer>& impl) + explicit GraphicProducerWrapper(const sp<IGraphicBufferProducer>& impl) : impl(impl), looper(new Looper(true)), result(NO_ERROR), diff --git a/services/surfaceflinger/SurfaceFlinger_hwc1.cpp b/services/surfaceflinger/SurfaceFlinger_hwc1.cpp index 00700ab590..9744b40f24 100644 --- a/services/surfaceflinger/SurfaceFlinger_hwc1.cpp +++ b/services/surfaceflinger/SurfaceFlinger_hwc1.cpp @@ -230,7 +230,7 @@ sp<IBinder> SurfaceFlinger::createDisplay(const String8& displayName, flinger->setTransactionFlags(eDisplayTransactionNeeded); } public: - DisplayToken(const sp<SurfaceFlinger>& flinger) + explicit DisplayToken(const sp<SurfaceFlinger>& flinger) : flinger(flinger) { } }; @@ -2475,7 +2475,7 @@ void SurfaceFlinger::initializeDisplays() { class MessageScreenInitialized : public MessageBase { SurfaceFlinger* flinger; public: - MessageScreenInitialized(SurfaceFlinger* flinger) : flinger(flinger) { } + explicit MessageScreenInitialized(SurfaceFlinger* flinger) : flinger(flinger) { } virtual bool handler() { flinger->onInitializeDisplays(); return true; @@ -3190,7 +3190,7 @@ class GraphicProducerWrapper : public BBinder, public MessageHandler { } public: - GraphicProducerWrapper(const sp<IGraphicBufferProducer>& impl) + explicit GraphicProducerWrapper(const sp<IGraphicBufferProducer>& impl) : impl(impl), looper(new Looper(true)), result(NO_ERROR), diff --git a/vulkan/libvulkan/layers_extensions.cpp b/vulkan/libvulkan/layers_extensions.cpp index f9b1002efe..78c86202f4 100644 --- a/vulkan/libvulkan/layers_extensions.cpp +++ b/vulkan/libvulkan/layers_extensions.cpp @@ -61,7 +61,7 @@ namespace { class LayerLibrary { public: - LayerLibrary(const std::string& path) + explicit LayerLibrary(const std::string& path) : path_(path), dlhandle_(nullptr), refcount_(0) {} LayerLibrary(LayerLibrary&& other) |