mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1048280 - Fix more bad implicit constructors in XPCOM; r=froydnj
This commit is contained in:
parent
d865feac08
commit
a635ff39b2
@ -79,7 +79,7 @@ public:
|
||||
class PerThreadData
|
||||
{
|
||||
public:
|
||||
PerThreadData(bool aIsMainThread = false)
|
||||
explicit PerThreadData(bool aIsMainThread = false)
|
||||
: mIsMainThread(aIsMainThread)
|
||||
, mIsHandlingObservation(false)
|
||||
, mCurrentGeneration(0)
|
||||
|
@ -71,7 +71,7 @@ private:
|
||||
class MonitorAutoLock
|
||||
{
|
||||
public:
|
||||
MonitorAutoLock(Monitor &aMonitor)
|
||||
explicit MonitorAutoLock(Monitor &aMonitor)
|
||||
: mMonitor(aMonitor)
|
||||
{
|
||||
mMonitor.Lock();
|
||||
@ -99,7 +99,7 @@ private:
|
||||
class MonitorAutoUnlock
|
||||
{
|
||||
public:
|
||||
MonitorAutoUnlock(Monitor &aMonitor)
|
||||
explicit MonitorAutoUnlock(Monitor &aMonitor)
|
||||
: mMonitor(aMonitor)
|
||||
{
|
||||
mMonitor.Unlock();
|
||||
@ -145,7 +145,7 @@ private:
|
||||
class AutoLock
|
||||
{
|
||||
public:
|
||||
AutoLock(Mutex& aLock)
|
||||
explicit AutoLock(Mutex& aLock)
|
||||
: mLock(aLock)
|
||||
{
|
||||
mLock.Lock();
|
||||
|
@ -94,7 +94,7 @@ static void RecordStackWalker(void *aPC, void *aSP, void *aClosure)
|
||||
class LateWriteObserver MOZ_FINAL : public IOInterposeObserver
|
||||
{
|
||||
public:
|
||||
LateWriteObserver(const char* aProfileDirectory)
|
||||
explicit LateWriteObserver(const char* aProfileDirectory)
|
||||
: mProfileDirectory(PL_strdup(aProfileDirectory))
|
||||
{
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ PRFileInfo64FN sFileInfo64Fn = nullptr;
|
||||
class NSPRIOAutoObservation : public IOInterposeObserver::Observation
|
||||
{
|
||||
public:
|
||||
NSPRIOAutoObservation(IOInterposeObserver::Operation aOp)
|
||||
explicit NSPRIOAutoObservation(IOInterposeObserver::Operation aOp)
|
||||
: IOInterposeObserver::Observation(aOp, "NSPRIOInterposer")
|
||||
{
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ public:
|
||||
NS_DECL_NSISEARCHABLEINPUTSTREAM
|
||||
NS_DECL_NSICLASSINFO
|
||||
|
||||
nsPipeInputStream(nsPipe* aPipe)
|
||||
explicit nsPipeInputStream(nsPipe* aPipe)
|
||||
: mPipe(aPipe)
|
||||
, mReaderRefCnt(0)
|
||||
, mLogicalOffset(0)
|
||||
@ -176,7 +176,7 @@ public:
|
||||
NS_DECL_NSIASYNCOUTPUTSTREAM
|
||||
NS_DECL_NSICLASSINFO
|
||||
|
||||
nsPipeOutputStream(nsPipe* aPipe)
|
||||
explicit nsPipeOutputStream(nsPipe* aPipe)
|
||||
: mPipe(aPipe)
|
||||
, mWriterRefCnt(0)
|
||||
, mLogicalOffset(0)
|
||||
|
@ -26,7 +26,7 @@
|
||||
class StringUnicharInputStream MOZ_FINAL : public nsIUnicharInputStream
|
||||
{
|
||||
public:
|
||||
StringUnicharInputStream(const nsAString& aString) :
|
||||
explicit StringUnicharInputStream(const nsAString& aString) :
|
||||
mString(aString), mPos(0), mLen(aString.Length()) { }
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
@ -29,7 +29,7 @@ class Foo MOZ_FINAL : public IFoo {
|
||||
|
||||
public:
|
||||
|
||||
Foo(int32_t aID);
|
||||
explicit Foo(int32_t aID);
|
||||
|
||||
// nsISupports implementation
|
||||
NS_DECL_ISUPPORTS
|
||||
|
@ -100,8 +100,8 @@ class ScopedXPCOM : public nsIDirectoryServiceProvider2
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
ScopedXPCOM(const char* testName,
|
||||
nsIDirectoryServiceProvider *dirSvcProvider = nullptr)
|
||||
explicit ScopedXPCOM(const char* testName,
|
||||
nsIDirectoryServiceProvider *dirSvcProvider = nullptr)
|
||||
: mDirSvcProvider(dirSvcProvider)
|
||||
{
|
||||
mTestName = testName;
|
||||
|
@ -21,7 +21,7 @@ namespace TestHashtables {
|
||||
class TestUniChar // for nsClassHashtable
|
||||
{
|
||||
public:
|
||||
TestUniChar(uint32_t aWord)
|
||||
explicit TestUniChar(uint32_t aWord)
|
||||
{
|
||||
printf(" TestUniChar::TestUniChar() %u\n", aWord);
|
||||
mWord = aWord;
|
||||
@ -70,7 +70,7 @@ public:
|
||||
typedef const char* KeyType;
|
||||
typedef const char* KeyTypePointer;
|
||||
|
||||
EntityToUnicodeEntry(const char* aKey) { mNode = nullptr; }
|
||||
explicit EntityToUnicodeEntry(const char* aKey) { mNode = nullptr; }
|
||||
EntityToUnicodeEntry(const EntityToUnicodeEntry& aEntry) { mNode = aEntry.mNode; }
|
||||
~EntityToUnicodeEntry() { }
|
||||
|
||||
|
@ -34,7 +34,7 @@ class TestObserver MOZ_FINAL : public nsIObserver,
|
||||
public nsSupportsWeakReference
|
||||
{
|
||||
public:
|
||||
TestObserver( const nsAString &name )
|
||||
explicit TestObserver( const nsAString &name )
|
||||
: mName( name ) {
|
||||
}
|
||||
NS_DECL_ISUPPORTS
|
||||
|
@ -67,7 +67,7 @@ bool gMainThreadWaiting = false;
|
||||
class AutoCreateAndDestroyReentrantMonitor
|
||||
{
|
||||
public:
|
||||
AutoCreateAndDestroyReentrantMonitor(ReentrantMonitor** aReentrantMonitorPtr)
|
||||
explicit AutoCreateAndDestroyReentrantMonitor(ReentrantMonitor** aReentrantMonitorPtr)
|
||||
: mReentrantMonitorPtr(aReentrantMonitorPtr) {
|
||||
*aReentrantMonitorPtr =
|
||||
new ReentrantMonitor("TestRacingServiceManager::AutoMon");
|
||||
|
@ -115,7 +115,7 @@ Listener::OnThreadShuttingDown()
|
||||
class AutoCreateAndDestroyReentrantMonitor
|
||||
{
|
||||
public:
|
||||
AutoCreateAndDestroyReentrantMonitor(ReentrantMonitor** aReentrantMonitorPtr)
|
||||
explicit AutoCreateAndDestroyReentrantMonitor(ReentrantMonitor** aReentrantMonitorPtr)
|
||||
: mReentrantMonitorPtr(aReentrantMonitorPtr) {
|
||||
*aReentrantMonitorPtr = new ReentrantMonitor("TestThreadPoolListener::AutoMon");
|
||||
TEST_ASSERTION(*aReentrantMonitorPtr, "Out of memory!");
|
||||
|
@ -51,7 +51,7 @@ namespace {
|
||||
class TimerObserverRunnable : public nsRunnable
|
||||
{
|
||||
public:
|
||||
TimerObserverRunnable(nsIObserver* aObserver)
|
||||
explicit TimerObserverRunnable(nsIObserver* aObserver)
|
||||
: mObserver(aObserver)
|
||||
{
|
||||
}
|
||||
|
@ -243,7 +243,7 @@ struct nsThreadShutdownContext
|
||||
class nsThreadShutdownAckEvent : public nsRunnable
|
||||
{
|
||||
public:
|
||||
nsThreadShutdownAckEvent(nsThreadShutdownContext* aCtx)
|
||||
explicit nsThreadShutdownAckEvent(nsThreadShutdownContext* aCtx)
|
||||
: mShutdownContext(aCtx)
|
||||
{
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user