Fix google-explicit-constructor warnings.
Bug: 28341362
Change-Id: Ibdd6a210bb7ff228e3624cc319169f77aca3b51e
diff --git a/native/android/asset_manager.cpp b/native/android/asset_manager.cpp
index dee3f8c..0e5e5c6 100644
--- a/native/android/asset_manager.cpp
+++ b/native/android/asset_manager.cpp
@@ -39,7 +39,7 @@
size_t mCurFileIndex;
String8 mCachedFileName;
- AAssetDir(AssetDir* dir) : mAssetDir(dir), mCurFileIndex(0) { }
+ explicit AAssetDir(AssetDir* dir) : mAssetDir(dir), mCurFileIndex(0) { }
~AAssetDir() { delete mAssetDir; }
};
@@ -48,7 +48,7 @@
struct AAsset {
Asset* mAsset;
- AAsset(Asset* asset) : mAsset(asset) { }
+ explicit AAsset(Asset* asset) : mAsset(asset) { }
~AAsset() { delete mAsset; }
};
diff --git a/native/android/choreographer.cpp b/native/android/choreographer.cpp
index e35c85b..c3629da 100644
--- a/native/android/choreographer.cpp
+++ b/native/android/choreographer.cpp
@@ -64,7 +64,7 @@
virtual ~Choreographer() = default;
private:
- Choreographer(const sp<Looper>& looper);
+ explicit Choreographer(const sp<Looper>& looper);
Choreographer(const Choreographer&) = delete;
virtual void dispatchVsync(nsecs_t timestamp, int32_t id, uint32_t count);
diff --git a/native/android/storage_manager.cpp b/native/android/storage_manager.cpp
index 399f1ff..137b72c 100644
--- a/native/android/storage_manager.cpp
+++ b/native/android/storage_manager.cpp
@@ -37,7 +37,7 @@
sp<AStorageManager> mStorageManager;
public:
- ObbActionListener(AStorageManager* mgr) :
+ explicit ObbActionListener(AStorageManager* mgr) :
mStorageManager(mgr)
{}