Fix google-explicit-constructor warnings in system/core.
* Declare explicit conversion constructors.
* Add NOLINT for implicit conversion constructors.
* Fix also some misaligned indendations.
Bug: 28341362
Change-Id: Idf911f35923b408d92285cc1a053f382ba08c63e
Test: build with clang-tidy
diff --git a/libmemunreachable/Allocator.h b/libmemunreachable/Allocator.h
index a8f579e..5390739 100644
--- a/libmemunreachable/Allocator.h
+++ b/libmemunreachable/Allocator.h
@@ -109,13 +109,13 @@
}
// Construct an STLAllocator on top of a Heap
- STLAllocator(const Heap& heap) :
+ STLAllocator(const Heap& heap) : // NOLINT, implicit
heap_(heap) {
}
// Rebind an STLAllocator from an another STLAllocator
template<typename U>
- STLAllocator(const STLAllocator<U>& other) :
+ STLAllocator(const STLAllocator<U>& other) : // NOLINT, implicit
heap_(other.heap_) {
}
@@ -155,12 +155,12 @@
public:
~Allocator() {}
- Allocator(const Heap& other) :
+ Allocator(const Heap& other) : // NOLINT, implicit
STLAllocator<T>(other) {
}
template<typename U>
- Allocator(const STLAllocator<U>& other) :
+ Allocator(const STLAllocator<U>& other) : // NOLINT, implicit
STLAllocator<T>(other) {
}