зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1061061 - Fix more bad implicit constructors in misc. code; r=bsmedberg
This commit is contained in:
Родитель
17b1ef89ea
Коммит
5bffafdd26
|
@ -41,7 +41,7 @@ public:
|
|||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
NS_DECL_NSIAUTHMODULE
|
||||
|
||||
nsAuthGSSAPI(pType package);
|
||||
explicit nsAuthGSSAPI(pType package);
|
||||
|
||||
static void Shutdown();
|
||||
|
||||
|
|
|
@ -140,7 +140,7 @@ public:
|
|||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
NS_DECL_NSIZIPENTRY
|
||||
|
||||
nsJARItem(nsZipItem* aZipItem);
|
||||
explicit nsJARItem(nsZipItem* aZipItem);
|
||||
|
||||
private:
|
||||
virtual ~nsJARItem() {}
|
||||
|
@ -167,7 +167,7 @@ public:
|
|||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
NS_DECL_NSIUTF8STRINGENUMERATOR
|
||||
|
||||
nsJAREnumerator(nsZipFind *aFind) : mFind(aFind), mName(nullptr) {
|
||||
explicit nsJAREnumerator(nsZipFind *aFind) : mFind(aFind), mName(nullptr) {
|
||||
NS_ASSERTION(mFind, "nsJAREnumerator: Missing zipFind.");
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ public:
|
|||
mLevel = 6;
|
||||
}
|
||||
|
||||
nsDeflateConverter(int32_t level)
|
||||
explicit nsDeflateConverter(int32_t level)
|
||||
{
|
||||
mLevel = level;
|
||||
}
|
||||
|
|
|
@ -105,7 +105,7 @@ public:
|
|||
ValueObserverHashKey(const char *aPref, PrefChangedFunc aCallback) :
|
||||
mPrefName(aPref), mCallback(aCallback) { }
|
||||
|
||||
ValueObserverHashKey(const ValueObserverHashKey *aOther) :
|
||||
explicit ValueObserverHashKey(const ValueObserverHashKey *aOther) :
|
||||
mPrefName(aOther->mPrefName), mCallback(aOther->mCallback)
|
||||
{ }
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ class PrefCallback : public PLDHashEntryHdr {
|
|||
}
|
||||
|
||||
// Copy constructor needs to be explicit or the linker complains.
|
||||
PrefCallback(const PrefCallback *&aCopy)
|
||||
explicit PrefCallback(const PrefCallback *&aCopy)
|
||||
: mDomain(aCopy->mDomain),
|
||||
mBranch(aCopy->mBranch),
|
||||
mWeakRef(aCopy->mWeakRef),
|
||||
|
|
|
@ -71,7 +71,7 @@ public:
|
|||
virtual nsresult Shutdown();
|
||||
|
||||
protected:
|
||||
nsProfileDirServiceProvider(bool aNotifyObservers = true);
|
||||
explicit nsProfileDirServiceProvider(bool aNotifyObservers = true);
|
||||
virtual ~nsProfileDirServiceProvider();
|
||||
|
||||
nsresult Initialize();
|
||||
|
|
|
@ -29,7 +29,7 @@ struct Connection
|
|||
PRFileDesc *mSocket;
|
||||
char mByte;
|
||||
|
||||
Connection(PRFileDesc *aSocket);
|
||||
explicit Connection(PRFileDesc *aSocket);
|
||||
~Connection();
|
||||
};
|
||||
|
||||
|
|
|
@ -212,7 +212,7 @@ public:
|
|||
NS_DECL_NSIURLCLASSIFIERCALLBACK
|
||||
|
||||
// Constructor and destructor
|
||||
PendingDBLookup(PendingLookup* aPendingLookup);
|
||||
explicit PendingDBLookup(PendingLookup* aPendingLookup);
|
||||
|
||||
// Look up the given URI in the safebrowsing DBs, optionally on both the allow
|
||||
// list and the blocklist. If there is a match, call
|
||||
|
|
|
@ -92,10 +92,10 @@ struct ScopedArrayBufferContentsTraits {
|
|||
};
|
||||
|
||||
struct ScopedArrayBufferContents: public Scoped<ScopedArrayBufferContentsTraits> {
|
||||
ScopedArrayBufferContents(MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM):
|
||||
explicit ScopedArrayBufferContents(MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM):
|
||||
Scoped<ScopedArrayBufferContentsTraits>(MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_TO_PARENT)
|
||||
{ }
|
||||
ScopedArrayBufferContents(const ArrayBufferContents& v
|
||||
explicit ScopedArrayBufferContents(const ArrayBufferContents& v
|
||||
MOZ_GUARD_OBJECT_NOTIFIER_PARAM):
|
||||
Scoped<ScopedArrayBufferContentsTraits>(v MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT)
|
||||
{ }
|
||||
|
@ -171,7 +171,7 @@ public:
|
|||
* @param aStartDate The instant at which the operation was
|
||||
* requested. Used to collect Telemetry statistics.
|
||||
*/
|
||||
AbstractResult(TimeStamp aStartDate)
|
||||
explicit AbstractResult(TimeStamp aStartDate)
|
||||
: mStartDate(aStartDate)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
@ -277,7 +277,7 @@ AbstractResult::GetResult(JSContext *cx, JS::MutableHandleValue aResult)
|
|||
class StringResult MOZ_FINAL : public AbstractResult
|
||||
{
|
||||
public:
|
||||
StringResult(TimeStamp aStartDate)
|
||||
explicit StringResult(TimeStamp aStartDate)
|
||||
: AbstractResult(aStartDate)
|
||||
{
|
||||
}
|
||||
|
@ -328,7 +328,7 @@ StringResult::GetCacheableResult(JSContext* cx, JS::MutableHandleValue aResult)
|
|||
class TypedArrayResult MOZ_FINAL : public AbstractResult
|
||||
{
|
||||
public:
|
||||
TypedArrayResult(TimeStamp aStartDate)
|
||||
explicit TypedArrayResult(TimeStamp aStartDate)
|
||||
: AbstractResult(aStartDate)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -101,7 +101,7 @@ private:
|
|||
nsRefPtr<nsAppStartup> mService;
|
||||
|
||||
public:
|
||||
nsAppExitEvent(nsAppStartup *service) : mService(service) {}
|
||||
explicit nsAppExitEvent(nsAppStartup *service) : mService(service) {}
|
||||
|
||||
NS_IMETHOD Run() {
|
||||
// Tell the appshell to exit
|
||||
|
|
|
@ -77,7 +77,7 @@ template<class EntryType>
|
|||
class AutoHashtable : public nsTHashtable<EntryType>
|
||||
{
|
||||
public:
|
||||
AutoHashtable(uint32_t initLength = PL_DHASH_DEFAULT_INITIAL_LENGTH);
|
||||
explicit AutoHashtable(uint32_t initLength = PL_DHASH_DEFAULT_INITIAL_LENGTH);
|
||||
typedef bool (*ReflectEntryFunc)(EntryType *entry, JSContext *cx, JS::Handle<JSObject*> obj);
|
||||
bool ReflectIntoJS(ReflectEntryFunc entryFunc, JSContext *cx, JS::Handle<JSObject*> obj);
|
||||
private:
|
||||
|
@ -306,7 +306,7 @@ class TelemetryIOInterposeObserver : public IOInterposeObserver
|
|||
};
|
||||
|
||||
public:
|
||||
TelemetryIOInterposeObserver(nsIFile* aXreDir);
|
||||
explicit TelemetryIOInterposeObserver(nsIFile* aXreDir);
|
||||
|
||||
/**
|
||||
* An implementation of Observe that records statistics of all
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace safebrowsing {
|
|||
// new hashes.
|
||||
class TableUpdate {
|
||||
public:
|
||||
TableUpdate(const nsACString& aTable)
|
||||
explicit TableUpdate(const nsACString& aTable)
|
||||
: mTable(aTable), mLocalUpdate(false) {}
|
||||
const nsCString& TableName() const { return mTable; }
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ class UrlClassifierDBServiceWorkerProxy MOZ_FINAL :
|
|||
public nsIUrlClassifierDBServiceWorker
|
||||
{
|
||||
public:
|
||||
UrlClassifierDBServiceWorkerProxy(nsIUrlClassifierDBServiceWorker* aTarget)
|
||||
explicit UrlClassifierDBServiceWorkerProxy(nsIUrlClassifierDBServiceWorker* aTarget)
|
||||
: mTarget(aTarget)
|
||||
{ }
|
||||
|
||||
|
@ -162,7 +162,7 @@ class UrlClassifierLookupCallbackProxy MOZ_FINAL :
|
|||
public nsIUrlClassifierLookupCallback
|
||||
{
|
||||
public:
|
||||
UrlClassifierLookupCallbackProxy(nsIUrlClassifierLookupCallback* aTarget)
|
||||
explicit UrlClassifierLookupCallbackProxy(nsIUrlClassifierLookupCallback* aTarget)
|
||||
: mTarget(new nsMainThreadPtrHolder<nsIUrlClassifierLookupCallback>(aTarget))
|
||||
{ }
|
||||
|
||||
|
@ -194,7 +194,7 @@ private:
|
|||
class UrlClassifierCallbackProxy MOZ_FINAL : public nsIUrlClassifierCallback
|
||||
{
|
||||
public:
|
||||
UrlClassifierCallbackProxy(nsIUrlClassifierCallback* aTarget)
|
||||
explicit UrlClassifierCallbackProxy(nsIUrlClassifierCallback* aTarget)
|
||||
: mTarget(new nsMainThreadPtrHolder<nsIUrlClassifierCallback>(aTarget))
|
||||
{ }
|
||||
|
||||
|
@ -227,7 +227,7 @@ class UrlClassifierUpdateObserverProxy MOZ_FINAL :
|
|||
public nsIUrlClassifierUpdateObserver
|
||||
{
|
||||
public:
|
||||
UrlClassifierUpdateObserverProxy(nsIUrlClassifierUpdateObserver* aTarget)
|
||||
explicit UrlClassifierUpdateObserverProxy(nsIUrlClassifierUpdateObserver* aTarget)
|
||||
: mTarget(new nsMainThreadPtrHolder<nsIUrlClassifierUpdateObserver>(aTarget))
|
||||
{ }
|
||||
|
||||
|
|
|
@ -295,7 +295,7 @@ static const int kMagicChildCrashReportFd = 4;
|
|||
static Mutex* dumpMapLock;
|
||||
struct ChildProcessData : public nsUint32HashKey
|
||||
{
|
||||
ChildProcessData(KeyTypePointer aKey)
|
||||
explicit ChildProcessData(KeyTypePointer aKey)
|
||||
: nsUint32HashKey(aKey)
|
||||
, sequence(0)
|
||||
#ifdef MOZ_CRASHREPORTER_INJECTOR
|
||||
|
@ -323,7 +323,7 @@ static nsIThread* sInjectorThread;
|
|||
class ReportInjectedCrash : public nsRunnable
|
||||
{
|
||||
public:
|
||||
ReportInjectedCrash(uint32_t pid) : mPID(pid) { }
|
||||
explicit ReportInjectedCrash(uint32_t pid) : mPID(pid) { }
|
||||
|
||||
NS_IMETHOD Run();
|
||||
|
||||
|
@ -1710,7 +1710,7 @@ class DelayedNote
|
|||
DelayedNote(const nsACString& aKey, const nsACString& aData)
|
||||
: mKey(aKey), mData(aData), mType(Annotation) {}
|
||||
|
||||
DelayedNote(const nsACString& aData)
|
||||
explicit DelayedNote(const nsACString& aData)
|
||||
: mData(aData), mType(AppNote) {}
|
||||
|
||||
void Run()
|
||||
|
|
|
@ -154,7 +154,7 @@ private:
|
|||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSISIMPLEENUMERATOR
|
||||
|
||||
ProfileEnumerator(nsToolkitProfile *first)
|
||||
explicit ProfileEnumerator(nsToolkitProfile *first)
|
||||
{ mCurrent = first; }
|
||||
private:
|
||||
~ProfileEnumerator() { }
|
||||
|
|
|
@ -1330,7 +1330,7 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIFACTORY
|
||||
|
||||
nsSingletonFactory(nsISupports* aSingleton);
|
||||
explicit nsSingletonFactory(nsISupports* aSingleton);
|
||||
|
||||
private:
|
||||
~nsSingletonFactory() { }
|
||||
|
|
|
@ -58,7 +58,7 @@ public:
|
|||
nsCString mStdout;
|
||||
nsCString mStderr;
|
||||
|
||||
Subprocess(const char* aTestName) {
|
||||
explicit Subprocess(const char* aTestName) {
|
||||
// set up stdio redirection
|
||||
PRFileDesc* readStdin; PRFileDesc* writeStdin;
|
||||
PRFileDesc* readStdout; PRFileDesc* writeStdout;
|
||||
|
|
|
@ -58,7 +58,7 @@ using namespace mozilla;
|
|||
class nsSiteWindow : public nsIEmbeddingSiteWindow
|
||||
{
|
||||
public:
|
||||
nsSiteWindow(nsContentTreeOwner *aAggregator);
|
||||
explicit nsSiteWindow(nsContentTreeOwner *aAggregator);
|
||||
virtual ~nsSiteWindow();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
|
|
@ -43,7 +43,7 @@ public:
|
|||
NS_DECL_NSIWINDOWPROVIDER
|
||||
|
||||
protected:
|
||||
nsContentTreeOwner(bool fPrimary);
|
||||
explicit nsContentTreeOwner(bool fPrimary);
|
||||
virtual ~nsContentTreeOwner();
|
||||
|
||||
void XULWindow(nsXULWindow* aXULWindow);
|
||||
|
|
|
@ -444,7 +444,7 @@ namespace mozilla {
|
|||
class WebShellWindowTimerCallback MOZ_FINAL : public nsITimerCallback
|
||||
{
|
||||
public:
|
||||
WebShellWindowTimerCallback(nsWebShellWindow* aWindow)
|
||||
explicit WebShellWindowTimerCallback(nsWebShellWindow* aWindow)
|
||||
: mWindow(aWindow)
|
||||
{}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ class nsWebShellWindow MOZ_FINAL : public nsXULWindow,
|
|||
public nsIWidgetListener
|
||||
{
|
||||
public:
|
||||
nsWebShellWindow(uint32_t aChromeFlags);
|
||||
explicit nsWebShellWindow(uint32_t aChromeFlags);
|
||||
|
||||
// nsISupports interface...
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
|
|
@ -80,7 +80,7 @@ protected:
|
|||
PAD_SIZE = 0x4
|
||||
};
|
||||
|
||||
nsXULWindow(uint32_t aChromeFlags);
|
||||
explicit nsXULWindow(uint32_t aChromeFlags);
|
||||
virtual ~nsXULWindow();
|
||||
|
||||
NS_IMETHOD EnsureChromeTreeOwner();
|
||||
|
|
|
@ -79,7 +79,7 @@ protected:
|
|||
nsIInterfaceRequestor* mRequestor; // WEAK
|
||||
nsCOMPtr<nsIRDFResource> mDirectory;
|
||||
|
||||
nsHTTPIndex(nsIInterfaceRequestor* aRequestor);
|
||||
explicit nsHTTPIndex(nsIInterfaceRequestor* aRequestor);
|
||||
nsresult CommonInit(void);
|
||||
nsresult Init(nsIURI* aBaseURL);
|
||||
void GetDestination(nsIRDFResource* r, nsXPIDLCString& dest);
|
||||
|
|
Загрузка…
Ссылка в новой задаче