Fix google-explicit-constructor warnings in utils.
* Declare explicit conversion constructors.
* Use NOLINT(implicit) for implicit conversion constructors.
Bug: 28341362
Change-Id: I4fb58fa32aafc520b2ed862a05a8bdbfabbc6c35
Test: build with WITH_TIDY=1
diff --git a/include/utils/RefBase.h b/include/utils/RefBase.h
index c82e7d9..950dbd0 100644
--- a/include/utils/RefBase.h
+++ b/include/utils/RefBase.h
@@ -222,12 +222,12 @@
inline wp() : m_ptr(0) { }
- wp(T* other);
+ wp(T* other); // NOLINT(implicit)
wp(const wp<T>& other);
- wp(const sp<T>& other);
- template<typename U> wp(U* other);
- template<typename U> wp(const sp<U>& other);
- template<typename U> wp(const wp<U>& other);
+ explicit wp(const sp<T>& other);
+ template<typename U> wp(U* other); // NOLINT(implicit)
+ template<typename U> wp(const sp<U>& other); // NOLINT(implicit)
+ template<typename U> wp(const wp<U>& other); // NOLINT(implicit)
~wp();