diff options
author | Chih-hung Hsieh <chh@google.com> | 2016-07-29 16:57:17 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2016-07-29 16:57:17 +0000 |
commit | 6dc68cb5f97a2f4fd3e0d105f34cd29dd73e0da5 (patch) | |
tree | 533121e90d08e695f1f9243fd82049876411904e /libmemunreachable | |
parent | 060b15e20ade882821e9f673abcd27c4e36f8857 (diff) | |
parent | 034c475931e8e4da54b499c0056121490f029865 (diff) | |
download | system_core-6dc68cb5f97a2f4fd3e0d105f34cd29dd73e0da5.tar.gz system_core-6dc68cb5f97a2f4fd3e0d105f34cd29dd73e0da5.tar.bz2 system_core-6dc68cb5f97a2f4fd3e0d105f34cd29dd73e0da5.zip |
Merge "Fix google-explicit-constructor warnings in system/core."
Diffstat (limited to 'libmemunreachable')
-rw-r--r-- | libmemunreachable/Allocator.h | 8 | ||||
-rw-r--r-- | libmemunreachable/HeapWalker.h | 2 | ||||
-rw-r--r-- | libmemunreachable/LeakFolding.h | 2 | ||||
-rw-r--r-- | libmemunreachable/LinkedList.h | 2 | ||||
-rw-r--r-- | libmemunreachable/PtracerThread.h | 2 | ||||
-rw-r--r-- | libmemunreachable/ScopedDisableMalloc.h | 2 | ||||
-rw-r--r-- | libmemunreachable/ScopedSignalHandler.h | 2 | ||||
-rw-r--r-- | libmemunreachable/Semaphore.h | 2 | ||||
-rw-r--r-- | libmemunreachable/Tarjan.h | 2 | ||||
-rw-r--r-- | libmemunreachable/tests/MemUnreachable_test.cpp | 2 |
10 files changed, 13 insertions, 13 deletions
diff --git a/libmemunreachable/Allocator.h b/libmemunreachable/Allocator.h index a8f579ee1..539073961 100644 --- a/libmemunreachable/Allocator.h +++ b/libmemunreachable/Allocator.h @@ -109,13 +109,13 @@ public: } // 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 @@ class Allocator : public STLAllocator<T> { 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) { } diff --git a/libmemunreachable/HeapWalker.h b/libmemunreachable/HeapWalker.h index 3c1b513c1..b25696fd4 100644 --- a/libmemunreachable/HeapWalker.h +++ b/libmemunreachable/HeapWalker.h @@ -48,7 +48,7 @@ struct compare_range { class HeapWalker { public: - HeapWalker(Allocator<HeapWalker> allocator) : allocator_(allocator), + explicit HeapWalker(Allocator<HeapWalker> allocator) : allocator_(allocator), allocations_(allocator), allocation_bytes_(0), roots_(allocator), root_vals_(allocator), segv_handler_(allocator), walking_ptr_(0) { diff --git a/libmemunreachable/LeakFolding.h b/libmemunreachable/LeakFolding.h index 732d3f281..9c6a525fc 100644 --- a/libmemunreachable/LeakFolding.h +++ b/libmemunreachable/LeakFolding.h @@ -54,7 +54,7 @@ class LeakFolding { bool dominator; SCCInfo* accumulator; - SCCInfo(Allocator<SCCInfo> allocator) : node(this, allocator), + explicit SCCInfo(Allocator<SCCInfo> allocator) : node(this, allocator), count(0), size(0), cuumulative_count(0), cuumulative_size(0), dominator(false), accumulator(nullptr) {} private: diff --git a/libmemunreachable/LinkedList.h b/libmemunreachable/LinkedList.h index 3e44035bd..132842da1 100644 --- a/libmemunreachable/LinkedList.h +++ b/libmemunreachable/LinkedList.h @@ -21,7 +21,7 @@ template<class T> class LinkedList { public: LinkedList() : next_(this), prev_(this), data_() {} - LinkedList(T data) : LinkedList() { + explicit LinkedList(T data) : LinkedList() { data_ = data; } ~LinkedList() {} diff --git a/libmemunreachable/PtracerThread.h b/libmemunreachable/PtracerThread.h index 4d6ca9a0d..f88b5994f 100644 --- a/libmemunreachable/PtracerThread.h +++ b/libmemunreachable/PtracerThread.h @@ -32,7 +32,7 @@ class Stack; // the parent. class PtracerThread { public: - PtracerThread(const std::function<int()>& func); + explicit PtracerThread(const std::function<int()>& func); ~PtracerThread(); bool Start(); int Join(); diff --git a/libmemunreachable/ScopedDisableMalloc.h b/libmemunreachable/ScopedDisableMalloc.h index 4f9637621..758d317aa 100644 --- a/libmemunreachable/ScopedDisableMalloc.h +++ b/libmemunreachable/ScopedDisableMalloc.h @@ -74,7 +74,7 @@ class ScopedDisableMalloc { class ScopedDisableMallocTimeout { public: - ScopedDisableMallocTimeout(std::chrono::milliseconds timeout = std::chrono::milliseconds(2000)) : + explicit ScopedDisableMallocTimeout(std::chrono::milliseconds timeout = std::chrono::milliseconds(2000)) : timeout_(timeout), timed_out_(false), disable_malloc_() { Disable(); } diff --git a/libmemunreachable/ScopedSignalHandler.h b/libmemunreachable/ScopedSignalHandler.h index e006d435e..1fd9d4d71 100644 --- a/libmemunreachable/ScopedSignalHandler.h +++ b/libmemunreachable/ScopedSignalHandler.h @@ -30,7 +30,7 @@ class ScopedSignalHandler { public: using Fn = std::function<void(ScopedSignalHandler&, int, siginfo_t*, void*)>; - ScopedSignalHandler(Allocator<Fn> allocator) : allocator_(allocator), signal_(-1) {} + explicit ScopedSignalHandler(Allocator<Fn> allocator) : allocator_(allocator), signal_(-1) {} ~ScopedSignalHandler() { reset(); } diff --git a/libmemunreachable/Semaphore.h b/libmemunreachable/Semaphore.h index 45e8c819d..6bcf4ea97 100644 --- a/libmemunreachable/Semaphore.h +++ b/libmemunreachable/Semaphore.h @@ -24,7 +24,7 @@ class Semaphore { public: - Semaphore(int count = 0) : count_(count) {} + explicit Semaphore(int count = 0) : count_(count) {} ~Semaphore() = default; void Wait(std::chrono::milliseconds ms) { diff --git a/libmemunreachable/Tarjan.h b/libmemunreachable/Tarjan.h index d7ecdb9ba..dcd139acb 100644 --- a/libmemunreachable/Tarjan.h +++ b/libmemunreachable/Tarjan.h @@ -62,7 +62,7 @@ using SCCList = allocator::vector<SCC<T>>; template<class T> class TarjanAlgorithm { public: - TarjanAlgorithm(Allocator<void> allocator) : index_(0), + explicit TarjanAlgorithm(Allocator<void> allocator) : index_(0), stack_(allocator), components_(allocator) {} void Execute(Graph<T>& graph, SCCList<T>& out); diff --git a/libmemunreachable/tests/MemUnreachable_test.cpp b/libmemunreachable/tests/MemUnreachable_test.cpp index 0747b12b6..2ae3db83e 100644 --- a/libmemunreachable/tests/MemUnreachable_test.cpp +++ b/libmemunreachable/tests/MemUnreachable_test.cpp @@ -27,7 +27,7 @@ void* ptr; class HiddenPointer { public: - HiddenPointer(size_t size = 256) { + explicit HiddenPointer(size_t size = 256) { Set(malloc(size)); } ~HiddenPointer() { |