Fix google-explicit-constructor warnings in frameworks/base
* Add explicit keyword to conversion constructors.
* Add NOLINT to implicit conversion constructors.
Bug: 28341362
Test: build with clang-tidy
Change-Id: Ie4d37072ab57d1662d18db4de1c8577247f43337
diff --git a/libs/hwui/Texture.h b/libs/hwui/Texture.h
index 4bcd96d..3aac374 100644
--- a/libs/hwui/Texture.h
+++ b/libs/hwui/Texture.h
@@ -30,7 +30,7 @@
*/
class Texture {
public:
- Texture(Caches& caches) : mCaches(caches) { }
+ explicit Texture(Caches& caches) : mCaches(caches) { }
virtual ~Texture() { }
@@ -120,7 +120,7 @@
class AutoTexture {
public:
- AutoTexture(const Texture* texture): mTexture(texture) { }
+ explicit AutoTexture(const Texture* texture): mTexture(texture) { }
~AutoTexture() {
if (mTexture && mTexture->cleanup) {
mTexture->deleteTexture();