Bug 1061248 - Fix some bad implicit constructors in LUL; r=BenWa

This commit is contained in:
Ehsan Akhgari 2014-09-02 09:45:28 -04:00
parent 52c39a7ffc
commit fc2212dc46
4 changed files with 6 additions and 6 deletions

View File

@ -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<void*>(const_cast<char*>(str_))); }
const char* str_;
};

View File

@ -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;
}

View File

@ -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

View File

@ -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