Bug 1061001 - Fix more bad implicit constructors in widget; r=roc

This commit is contained in:
Ehsan Akhgari 2014-08-31 23:33:13 -04:00
parent 64f296432b
commit 273543e51a
10 changed files with 25 additions and 25 deletions

View File

@ -61,19 +61,19 @@ public:
Clear();
}
TISInputSourceWrapper(const char* aID)
explicit TISInputSourceWrapper(const char* aID)
{
mInputSourceList = nullptr;
InitByInputSourceID(aID);
}
TISInputSourceWrapper(SInt32 aLayoutID)
explicit TISInputSourceWrapper(SInt32 aLayoutID)
{
mInputSourceList = nullptr;
InitByLayoutID(aLayoutID);
}
TISInputSourceWrapper(TISInputSourceRef aInputSource)
explicit TISInputSourceWrapper(TISInputSourceRef aInputSource)
{
mInputSourceList = nullptr;
InitByTISInputSourceRef(aInputSource);
@ -496,7 +496,7 @@ protected:
Clear();
}
KeyEventState(NSEvent* aNativeKeyEvent) : mKeyEvent(nullptr)
explicit KeyEventState(NSEvent* aNativeKeyEvent) : mKeyEvent(nullptr)
{
Clear();
Set(aNativeKeyEvent);
@ -555,7 +555,7 @@ protected:
class AutoKeyEventStateCleaner
{
public:
AutoKeyEventStateCleaner(TextInputHandlerBase* aHandler) :
explicit AutoKeyEventStateCleaner(TextInputHandlerBase* aHandler) :
mHandler(aHandler)
{
}

View File

@ -289,7 +289,7 @@ namespace {
// OMTC BasicLayers drawing.
class RectTextureImage {
public:
RectTextureImage(GLContext* aGLContext)
explicit RectTextureImage(GLContext* aGLContext)
: mGLContext(aGLContext)
, mTexture(0)
, mInUpdate(false)
@ -357,7 +357,7 @@ public:
return context ? new GLPresenter(context) : nullptr;
}
GLPresenter(GLContext* aContext);
explicit GLPresenter(GLContext* aContext);
virtual ~GLPresenter();
virtual GLContext* gl() const MOZ_OVERRIDE { return mGLContext; }
@ -398,7 +398,7 @@ class APZCTMController : public mozilla::layers::GeckoContentController
class RequestContentRepaintEvent : public nsRunnable
{
public:
RequestContentRepaintEvent(const FrameMetrics& aFrameMetrics)
explicit RequestContentRepaintEvent(const FrameMetrics& aFrameMetrics)
: mFrameMetrics(aFrameMetrics)
{
}

View File

@ -13,7 +13,7 @@
class nsScreenCocoa : public nsBaseScreen
{
public:
nsScreenCocoa (NSScreen *screen);
explicit nsScreenCocoa (NSScreen *screen);
~nsScreenCocoa ();
NS_IMETHOD GetId(uint32_t* outId);

View File

@ -26,7 +26,7 @@ protected:
struct StatusItem
{
StatusItem(nsStandaloneNativeMenu* aMenu);
explicit StatusItem(nsStandaloneNativeMenu* aMenu);
~StatusItem();
private:

View File

@ -40,7 +40,7 @@ class ExitAppShellRunnable : public nsRunnable
nsCOMPtr<nsIAppShell> mAppShell;
public:
ExitAppShellRunnable(nsIAppShell* aAppShell)
explicit ExitAppShellRunnable(nsIAppShell* aAppShell)
: mAppShell(aAppShell)
{ }
@ -70,7 +70,7 @@ class CheckStableStateRunnable : public nsRunnable
bool mShouldHaveRun;
public:
CheckStableStateRunnable(bool aShouldHaveRun)
explicit CheckStableStateRunnable(bool aShouldHaveRun)
: mShouldHaveRun(aShouldHaveRun)
{ }
@ -93,7 +93,7 @@ protected:
nsCOMPtr<nsIAppShell> mAppShell;
public:
ScheduleStableStateRunnable(nsIAppShell* aAppShell)
explicit ScheduleStableStateRunnable(nsIAppShell* aAppShell)
: CheckStableStateRunnable(false), mAppShell(aAppShell)
{ }
@ -117,7 +117,7 @@ class NextTestRunnable : public nsRunnable
nsCOMPtr<nsIAppShell> mAppShell;
public:
NextTestRunnable(nsIAppShell* aAppShell)
explicit NextTestRunnable(nsIAppShell* aAppShell)
: mAppShell(aAppShell)
{ }
@ -127,7 +127,7 @@ public:
class ScheduleNestedStableStateRunnable : public ScheduleStableStateRunnable
{
public:
ScheduleNestedStableStateRunnable(nsIAppShell* aAppShell)
explicit ScheduleNestedStableStateRunnable(nsIAppShell* aAppShell)
: ScheduleStableStateRunnable(aAppShell)
{ }
@ -171,7 +171,7 @@ class EventListener MOZ_FINAL : public nsIDOMEventListener
public:
NS_DECL_ISUPPORTS
EventListener(nsIAppShell* aAppShell)
explicit EventListener(nsIAppShell* aAppShell)
: mAppShell(aAppShell)
{ }

View File

@ -48,7 +48,7 @@ class PuppetWidget MOZ_FINAL : public nsBaseWidget,
static const size_t kMaxDimension;
public:
PuppetWidget(TabChild* aTabChild);
explicit PuppetWidget(TabChild* aTabChild);
protected:
virtual ~PuppetWidget();
@ -209,7 +209,7 @@ private:
class PaintTask : public nsRunnable {
public:
NS_DECL_NSIRUNNABLE
PaintTask(PuppetWidget* widget) : mWidget(widget) {}
explicit PaintTask(PuppetWidget* widget) : mWidget(widget) {}
void Revoke() { mWidget = nullptr; }
private:
PuppetWidget* mWidget;
@ -257,7 +257,7 @@ private:
struct AutoCacheNativeKeyCommands
{
AutoCacheNativeKeyCommands(PuppetWidget* aWidget)
explicit AutoCacheNativeKeyCommands(PuppetWidget* aWidget)
: mWidget(aWidget)
{
mSavedValid = mWidget->mNativeKeyCommandsValid;
@ -303,7 +303,7 @@ private:
class PuppetScreen : public nsBaseScreen
{
public:
PuppetScreen(void* nativeScreen);
explicit PuppetScreen(void* nativeScreen);
~PuppetScreen();
NS_IMETHOD GetId(uint32_t* aId) MOZ_OVERRIDE;

View File

@ -74,7 +74,7 @@ class nsBaseFilePickerEnumerator : public nsISimpleEnumerator
public:
NS_DECL_ISUPPORTS
nsBaseFilePickerEnumerator(nsISimpleEnumerator* iterator)
explicit nsBaseFilePickerEnumerator(nsISimpleEnumerator* iterator)
: mIterator(iterator)
{}

View File

@ -53,7 +53,7 @@ class WidgetShutdownObserver MOZ_FINAL : public nsIObserver
~WidgetShutdownObserver() {}
public:
WidgetShutdownObserver(nsBaseWidget* aWidget)
explicit WidgetShutdownObserver(nsBaseWidget* aWidget)
: mWidget(aWidget)
{ }
@ -274,7 +274,7 @@ public:
class AutoUseBasicLayerManager {
public:
AutoUseBasicLayerManager(nsBaseWidget* aWidget);
explicit AutoUseBasicLayerManager(nsBaseWidget* aWidget);
~AutoUseBasicLayerManager();
private:
nsBaseWidget* mWidget;

View File

@ -46,7 +46,7 @@ public:
NS_DECL_ISUPPORTS
NS_DECL_NSIOBSERVER
nsIdleServiceDaily(nsIIdleService* aIdleService);
explicit nsIdleServiceDaily(nsIIdleService* aIdleService);
/**
* Initializes the daily idle observer.

View File

@ -22,7 +22,7 @@ class nsDataObj;
//
struct DataStruct
{
DataStruct ( const char* aFlavor )
explicit DataStruct ( const char* aFlavor )
: mDataLen(0), mFlavor(aFlavor), mCacheFileName(nullptr) { }
~DataStruct();