Bug 1061059 - Fix more bad implicit constructors in embedding; r=bsmedberg
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 02 Sep 2014 18:22:57 -0400
changeset 203287 df899ce52dea6d608362efd29e1c19ef0bc4a3a7
parent 203286 1d4cf18b141183102b5e5b9958def19a64d325a8
child 203288 adfa67ea01c6808d7761e80313283a55923fe390
push id27425
push userryanvm@gmail.com
push dateWed, 03 Sep 2014 20:38:59 +0000
treeherdermozilla-central@acbdce59da2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs1061059
milestone35.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1061059 - Fix more bad implicit constructors in embedding; r=bsmedberg
embedding/components/commandhandler/nsCommandGroup.cpp
embedding/components/find/nsFind.cpp
embedding/components/webbrowserpersist/nsWebBrowserPersist.cpp
embedding/components/windowwatcher/nsAutoWindowStateHelper.h
embedding/components/windowwatcher/nsWindowWatcher.cpp
--- a/embedding/components/commandhandler/nsCommandGroup.cpp
+++ b/embedding/components/commandhandler/nsCommandGroup.cpp
@@ -13,17 +13,17 @@
 #include "nsCommandGroup.h"
 #include "nsIControllerCommand.h"
 #include "nsCRT.h"
 
 
 class nsGroupsEnumerator : public nsISimpleEnumerator
 {
 public:
-  nsGroupsEnumerator(nsControllerCommandGroup::GroupsHashtable &inHashTable);
+  explicit nsGroupsEnumerator(nsControllerCommandGroup::GroupsHashtable &inHashTable);
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSISIMPLEENUMERATOR
 
 protected:
   virtual ~nsGroupsEnumerator();
 
   static PLDHashOperator HashEnum(const nsACString &aKey, nsTArray<nsCString> *aData, void *aClosure);
@@ -127,17 +127,17 @@ nsGroupsEnumerator::Initialize()
 
 #if 0
 #pragma mark -
 #endif
 
 class nsNamedGroupEnumerator : public nsISimpleEnumerator
 {
 public:
-  nsNamedGroupEnumerator(nsTArray<nsCString> *inArray);
+  explicit nsNamedGroupEnumerator(nsTArray<nsCString> *inArray);
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSISIMPLEENUMERATOR
 
 protected:
   virtual ~nsNamedGroupEnumerator();
 
   nsTArray<nsCString> *mGroupArray;
--- a/embedding/components/find/nsFind.cpp
+++ b/embedding/components/find/nsFind.cpp
@@ -77,17 +77,17 @@ PR_STATIC_ASSERT(CH_SHY <= 255);
 // inner-iterator and then reposition the outer-iterator outside.
 //
 // 5) The implementation assumes that First() and Next() are only called
 // in find-forward mode, while Last() and Prev() are used in find-backward.
 
 class nsFindContentIterator : public nsIContentIterator
 {
 public:
-  nsFindContentIterator(bool aFindBackward)
+  explicit nsFindContentIterator(bool aFindBackward)
     : mStartOffset(0),
       mEndOffset(0),
       mFindBackward(aFindBackward)
   {
   }
 
   // nsISupports
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
--- a/embedding/components/webbrowserpersist/nsWebBrowserPersist.cpp
+++ b/embedding/components/webbrowserpersist/nsWebBrowserPersist.cpp
@@ -149,17 +149,17 @@ struct OutputData
 };
 
 struct UploadData
 {
     nsCOMPtr<nsIURI> mFile;
     int64_t mSelfProgress;
     int64_t mSelfProgressMax;
 
-    UploadData(nsIURI *aFile) :
+    explicit UploadData(nsIURI *aFile) :
         mFile(aFile),
         mSelfProgress(0),
         mSelfProgressMax(10000)
     {
     }
 };
 
 struct CleanupData
--- a/embedding/components/windowwatcher/nsAutoWindowStateHelper.h
+++ b/embedding/components/windowwatcher/nsAutoWindowStateHelper.h
@@ -14,17 +14,17 @@
  * windows.
  */
 
 class nsPIDOMWindow;
 
 class nsAutoWindowStateHelper
 {
 public:
-  nsAutoWindowStateHelper(nsPIDOMWindow *aWindow);
+  explicit nsAutoWindowStateHelper(nsPIDOMWindow *aWindow);
   ~nsAutoWindowStateHelper();
 
   bool DefaultEnabled()
   {
     return mDefaultEnabled;
   }
 
 protected:
--- a/embedding/components/windowwatcher/nsWindowWatcher.cpp
+++ b/embedding/components/windowwatcher/nsWindowWatcher.cpp
@@ -137,17 +137,17 @@ void nsWatcherWindowEntry::ReferenceSelf
 
 /****************************************************************
  ****************** nsWatcherWindowEnumerator *******************
  ****************************************************************/
 
 class nsWatcherWindowEnumerator : public nsISimpleEnumerator {
 
 public:
-  nsWatcherWindowEnumerator(nsWindowWatcher *inWatcher);
+  explicit nsWatcherWindowEnumerator(nsWindowWatcher *inWatcher);
   NS_IMETHOD HasMoreElements(bool *retval);
   NS_IMETHOD GetNext(nsISupports **retval);
 
   NS_DECL_ISUPPORTS
 
 protected:
   virtual ~nsWatcherWindowEnumerator();