From a725e9f55fd96712812dc009920d47053f9ddcb3 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Tue, 2 Sep 2014 09:45:28 -0400 Subject: [PATCH] Bug 1061248 - Fix some bad implicit constructors in LUL; r=BenWa --- tools/profiler/LulCommon.cpp | 2 +- tools/profiler/LulMain.cpp | 4 ++-- tools/profiler/LulMain.h | 4 ++-- tools/profiler/LulMainInt.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/profiler/LulCommon.cpp b/tools/profiler/LulCommon.cpp index 86c3e500e58b..9664230ee3c4 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 6e6c1d235f10..0384afc8f488 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 ec84d43882d9..ac97a908f9fe 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 16cd391ab9ff..5b795d659332 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