Fix google-explicit-constructor warnings in surfaceflinger.
* Add explicit keyword to conversion constructors,
or use NOLINT for implicit converters.
Bug: 28341362
Test: build with WITH_TIDY=1
Change-Id: I94f511c3be31dc22022db6466ee9ed0c6be2bc8e
diff --git a/services/surfaceflinger/DisplayHardware/HWC2On1Adapter.h b/services/surfaceflinger/DisplayHardware/HWC2On1Adapter.h
index dc7c355..5debb9a 100644
--- a/services/surfaceflinger/DisplayHardware/HWC2On1Adapter.h
+++ b/services/surfaceflinger/DisplayHardware/HWC2On1Adapter.h
@@ -43,7 +43,7 @@
class HWC2On1Adapter : public hwc2_device_t
{
public:
- HWC2On1Adapter(struct hwc_composer_device_1* hwc1Device);
+ explicit HWC2On1Adapter(struct hwc_composer_device_1* hwc1Device);
~HWC2On1Adapter();
struct hwc_composer_device_1* getHwc1Device() const { return mHwc1Device; }
@@ -488,7 +488,7 @@
class Layer {
public:
- Layer(Display& display);
+ explicit Layer(Display& display);
bool operator==(const Layer& other) { return mId == other.mId; }
bool operator!=(const Layer& other) { return !(*this == other); }