diff --git a/tools/profiler/LulCommon.cpp b/tools/profiler/LulCommon.cpp index 86c3e500e58..9664230ee3c 100644 --- a/tools/profiler/LulCommon.cpp +++ b/tools/profiler/LulCommon.cpp @@ -72,7 +72,7 @@ Module::~Module() { // class UniqueString { public: - UniqueString(string str) { str_ = strdup(str.c_str()); } + explicit UniqueString(string str) { str_ = strdup(str.c_str()); } ~UniqueString() { free(reinterpret_cast(const_cast(str_))); } const char* str_; }; diff --git a/tools/profiler/LulMain.cpp b/tools/profiler/LulMain.cpp index 6e6c1d235f1..0384afc8f48 100644 --- a/tools/profiler/LulMain.cpp +++ b/tools/profiler/LulMain.cpp @@ -490,7 +490,7 @@ class SegArray { class PriMap { public: - PriMap(void (*aLog)(const char*)) + explicit PriMap(void (*aLog)(const char*)) : mLog(aLog) {} @@ -838,7 +838,7 @@ class PriMap { class CFICache { public: - CFICache(PriMap* aPriMap) { + explicit CFICache(PriMap* aPriMap) { Invalidate(); mPriMap = aPriMap; } diff --git a/tools/profiler/LulMain.h b/tools/profiler/LulMain.h index ec84d43882d..ac97a908f9f 100644 --- a/tools/profiler/LulMain.h +++ b/tools/profiler/LulMain.h @@ -60,7 +60,7 @@ namespace lul { class TaggedUWord { public: // Construct a valid one. - TaggedUWord(uintptr_t w) + explicit TaggedUWord(uintptr_t w) : mValue(w) , mValid(true) {} @@ -165,7 +165,7 @@ class CFICache; class LUL { public: // Create; supply a logging sink. Initialises the rw-lock. - LUL(void (*aLog)(const char*)); + explicit LUL(void (*aLog)(const char*)); // Destroy. This acquires mRWlock for writing. By doing that, waits // for all unwinder threads to finish any Unwind() calls they may be diff --git a/tools/profiler/LulMainInt.h b/tools/profiler/LulMainInt.h index 16cd391ab9f..5b795d65933 100644 --- a/tools/profiler/LulMainInt.h +++ b/tools/profiler/LulMainInt.h @@ -223,7 +223,7 @@ public: // so let's use mSummaryMinAddr == 1 and mSummaryMaxAddr == 0 to denote // this case. - SecMap(void(*aLog)(const char*)); + explicit SecMap(void(*aLog)(const char*)); ~SecMap(); // Binary search mRuleSets to find one that brackets |ia|, or nullptr