mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 1047781 - Fix more bad implicit constructors in XPCOM; r=froydnj
This commit is contained in:
parent
4d78ae894d
commit
c885140822
@ -36,7 +36,7 @@ public:
|
||||
/**
|
||||
* Constructor for plain files
|
||||
*/
|
||||
FileLocation(nsIFile *file);
|
||||
explicit FileLocation(nsIFile *file);
|
||||
|
||||
/**
|
||||
* Constructors for path within an archive. The archive can be given either
|
||||
|
@ -153,7 +153,7 @@ IsNewline(char aChar)
|
||||
namespace {
|
||||
struct AutoPR_smprintf_free
|
||||
{
|
||||
AutoPR_smprintf_free(char* aBuf) : mBuf(aBuf) {}
|
||||
explicit AutoPR_smprintf_free(char* aBuf) : mBuf(aBuf) {}
|
||||
|
||||
~AutoPR_smprintf_free()
|
||||
{
|
||||
|
@ -34,7 +34,7 @@ class nsIMemoryReporter;
|
||||
class CategoryLeaf : public nsDepCharHashKey
|
||||
{
|
||||
public:
|
||||
CategoryLeaf(const char* aKey) : nsDepCharHashKey(aKey), value(nullptr) {}
|
||||
explicit CategoryLeaf(const char* aKey) : nsDepCharHashKey(aKey), value(nullptr) {}
|
||||
const char* value;
|
||||
};
|
||||
|
||||
|
@ -215,7 +215,7 @@ namespace {
|
||||
class MOZ_STACK_CLASS MutexLock
|
||||
{
|
||||
public:
|
||||
MutexLock(SafeMutex& aMutex)
|
||||
explicit MutexLock(SafeMutex& aMutex)
|
||||
: mMutex(aMutex)
|
||||
, mLocked(false)
|
||||
{
|
||||
|
@ -78,7 +78,7 @@ extern const mozilla::Module kXPCOMModule;
|
||||
class SafeMutex
|
||||
{
|
||||
public:
|
||||
SafeMutex(const char* aName)
|
||||
explicit SafeMutex(const char* aName)
|
||||
: mMutex(aName)
|
||||
, mOwnerThread(nullptr)
|
||||
{
|
||||
@ -212,14 +212,14 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
KnownModule(const mozilla::Module* aModule)
|
||||
explicit KnownModule(const mozilla::Module* aModule)
|
||||
: mModule(aModule)
|
||||
, mLoaded(false)
|
||||
, mFailed(false)
|
||||
{
|
||||
}
|
||||
|
||||
KnownModule(mozilla::FileLocation& aFile)
|
||||
explicit KnownModule(mozilla::FileLocation& aFile)
|
||||
: mModule(nullptr)
|
||||
, mFile(aFile)
|
||||
, mLoader(nullptr)
|
||||
|
@ -107,7 +107,7 @@ public:
|
||||
const char* GetEntryNameAt(uint16_t i);
|
||||
|
||||
private:
|
||||
xptiTypelibGuts(XPTHeader* aHeader)
|
||||
explicit xptiTypelibGuts(XPTHeader* aHeader)
|
||||
: mHeader(aHeader)
|
||||
{ }
|
||||
~xptiTypelibGuts();
|
||||
@ -128,7 +128,7 @@ class xptiInfoFlags
|
||||
{
|
||||
enum {STATE_MASK = 3};
|
||||
public:
|
||||
xptiInfoFlags(uint8_t n) : mData(n) {}
|
||||
explicit xptiInfoFlags(uint8_t n) : mData(n) {}
|
||||
xptiInfoFlags(const xptiInfoFlags& r) : mData(r.mData) {}
|
||||
|
||||
static uint8_t GetStateMask()
|
||||
@ -334,7 +334,7 @@ public:
|
||||
NS_IMETHOD GetIIDForParamNoAlloc(uint16_t methodIndex, const nsXPTParamInfo * param, nsIID *iid) { return !mEntry ? NS_ERROR_UNEXPECTED : mEntry->GetIIDForParamNoAlloc(methodIndex, param, iid); }
|
||||
|
||||
public:
|
||||
xptiInterfaceInfo(xptiInterfaceEntry* entry);
|
||||
explicit xptiInterfaceInfo(xptiInterfaceEntry* entry);
|
||||
|
||||
void Invalidate()
|
||||
{NS_IF_RELEASE(mParent); mEntry = nullptr;}
|
||||
|
Loading…
Reference in New Issue
Block a user