Fix/suppress androidfw google-explicit-constructor warnings
* Add explicit to conversion constructors/operators
* Use NOLINT or NOLINTNEXTLINE to suppress warnings on intended converters
Bug: 28341362
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,google-explicit-constructor
Change-Id: Id02c36c24f5708584e317c035cef3ef2762b537e
diff --git a/libs/androidfw/ZipUtils.cpp b/libs/androidfw/ZipUtils.cpp
index 5d243da..5be2105 100644
--- a/libs/androidfw/ZipUtils.cpp
+++ b/libs/androidfw/ZipUtils.cpp
@@ -37,7 +37,7 @@
// TODO: This can go away once the only remaining usage in aapt goes away.
class FileReader : public zip_archive::Reader {
public:
- FileReader(FILE* fp) : Reader(), mFp(fp), mCurrentOffset(0) {
+ explicit FileReader(FILE* fp) : Reader(), mFp(fp), mCurrentOffset(0) {
}
bool ReadAtOffset(uint8_t* buf, size_t len, uint32_t offset) const {