Address a bunch of clang-tidy complaints.
There were a bunch more unreasonable/incorrect ones, but these ones
seemed legit. Nothing very interesting, though.
Bug: N/A
Test: ran tests, benchmarks
Change-Id: If66971194d4a7b4bf6d0251bedb88e8cdc88a76f
diff --git a/libc/malloc_debug/MapData.h b/libc/malloc_debug/MapData.h
index 0238139..895f78f 100644
--- a/libc/malloc_debug/MapData.h
+++ b/libc/malloc_debug/MapData.h
@@ -41,7 +41,7 @@
MapEntry(uintptr_t start, uintptr_t end, uintptr_t offset, const char* name, size_t name_len)
: start(start), end(end), offset(offset), name(name, name_len) {}
- MapEntry(uintptr_t pc) : start(pc), end(pc) {}
+ explicit MapEntry(uintptr_t pc) : start(pc), end(pc) {}
uintptr_t start;
uintptr_t end;
diff --git a/libc/malloc_debug/OptionData.h b/libc/malloc_debug/OptionData.h
index 80190f5..5c2d272 100644
--- a/libc/malloc_debug/OptionData.h
+++ b/libc/malloc_debug/OptionData.h
@@ -34,7 +34,7 @@
class OptionData {
public:
- OptionData(DebugData* debug) : debug_(debug) {}
+ explicit OptionData(DebugData* debug) : debug_(debug) {}
~OptionData() = default;
protected:
diff --git a/libc/malloc_debug/RecordData.h b/libc/malloc_debug/RecordData.h
index 6e19923..ccabac2 100644
--- a/libc/malloc_debug/RecordData.h
+++ b/libc/malloc_debug/RecordData.h
@@ -66,7 +66,7 @@
class AllocEntry : public RecordEntry {
public:
- AllocEntry(void* pointer);
+ explicit AllocEntry(void* pointer);
virtual ~AllocEntry() = default;
protected:
@@ -92,7 +92,7 @@
class FreeEntry : public AllocEntry {
public:
- FreeEntry(void* pointer);
+ explicit FreeEntry(void* pointer);
virtual ~FreeEntry() = default;
std::string GetString() const override;
diff --git a/libc/malloc_debug/TrackData.h b/libc/malloc_debug/TrackData.h
index f7486e9..9a649b9 100644
--- a/libc/malloc_debug/TrackData.h
+++ b/libc/malloc_debug/TrackData.h
@@ -46,7 +46,7 @@
class TrackData : public OptionData {
public:
- TrackData(DebugData* debug_data);
+ explicit TrackData(DebugData* debug_data);
virtual ~TrackData() = default;
void GetList(std::vector<const Header*>* list);