Bug 1487082 - make conversion CTORs explicit. r=jorgk
authorBen Campbell <benc@thunderbird.net>
Fri, 31 Aug 2018 11:50:02 +1200
changeset 33171 f4212f66b639624c507a68f1a6db487022ca9fdb
parent 33170 92d500eaee7f62857e0d063f0506309589d286e3
child 33172 71ff55c3ec2e94de01c94a8de546f15e6a3f7d75
push id387
push userclokep@gmail.com
push dateMon, 10 Dec 2018 21:30:47 +0000
reviewersjorgk
bugs1487082
Bug 1487082 - make conversion CTORs explicit. r=jorgk Minor tweaks to conform with new(ish) static analysis rule which flags up implicit single-argument conversion constructors.
calendar/base/backend/libical/calDuration.h
db/mork/src/morkAtom.h
db/mork/src/morkBead.h
db/mork/src/morkDeque.h
db/mork/src/morkFactory.h
db/mork/src/morkNode.h
db/mork/src/morkParser.cpp
db/mork/src/morkRow.h
mailnews/addrbook/src/nsAbBSDirectory.cpp
mailnews/addrbook/src/nsAbUtils.h
mailnews/addrbook/src/nsAddrDatabase.cpp
mailnews/base/search/public/nsMsgResultElement.h
mailnews/base/search/public/nsMsgSearchBoolExpression.h
mailnews/base/search/src/nsMsgSearchValue.h
mailnews/base/src/nsMailDirProvider.h
mailnews/base/src/nsMsgCopyService.h
mailnews/base/src/nsMsgDBView.h
mailnews/base/src/nsMsgGroupThread.h
mailnews/base/src/nsMsgPrintEngine.cpp
mailnews/base/util/nsMsgKeySet.h
mailnews/base/util/nsMsgLineBuffer.h
mailnews/compose/src/nsMsgSendLater.h
mailnews/compose/src/nsMsgSendPart.h
mailnews/compose/src/nsSmtpProtocol.h
mailnews/compose/src/nsURLFetcher.h
mailnews/db/msgdb/public/nsDBFolderInfo.h
mailnews/db/msgdb/src/nsMailDatabase.cpp
mailnews/db/msgdb/src/nsMsgDatabase.cpp
mailnews/db/msgdb/src/nsMsgHdr.cpp
mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.cpp
mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.h
mailnews/imap/src/nsAutoSyncState.h
mailnews/imap/src/nsImapFlagAndUidState.h
mailnews/imap/src/nsImapMailFolder.cpp
mailnews/imap/src/nsImapMailFolder.h
mailnews/imap/src/nsImapProtocol.cpp
mailnews/imap/src/nsImapSearchResults.h
mailnews/imap/src/nsImapServerResponseParser.h
mailnews/imap/src/nsSyncRunnableHelpers.h
mailnews/import/src/nsImportFieldMap.h
mailnews/import/src/nsImportMail.cpp
mailnews/import/text/src/nsTextImport.cpp
mailnews/import/vcard/src/nsVCardImport.cpp
mailnews/jsaccount/src/DelegateList.h
mailnews/jsaccount/src/JaAbDirectory.h
mailnews/jsaccount/src/JaCompose.h
mailnews/jsaccount/src/JaIncomingServer.h
mailnews/jsaccount/src/JaMsgFolder.h
mailnews/jsaccount/src/JaSend.h
mailnews/jsaccount/src/JaUrl.h
mailnews/local/src/nsMailboxProtocol.h
mailnews/local/src/nsParseMailbox.h
mailnews/local/src/nsPop3Protocol.h
mailnews/mime/public/MimeHeaderParser.h
mailnews/mime/src/nsCMS.h
mailnews/mime/src/nsSimpleMimeConverterStub.cpp
--- a/calendar/base/backend/libical/calDuration.h
+++ b/calendar/base/backend/libical/calDuration.h
@@ -12,17 +12,17 @@ extern "C" {
     #include "ical.h"
 }
 
 class calDuration final : public calIDurationLibical
 {
 public:
     calDuration ();
     calDuration (const calDuration& cdt);
-    calDuration (const struct icaldurationtype * const aDurationPtr);
+    explicit calDuration (const struct icaldurationtype * const aDurationPtr);
 
     // nsISupports interface
     NS_DECL_ISUPPORTS
 
     // calIDateTime interface
     NS_DECL_CALIDURATION
     NS_DECL_CALIDURATIONLIBICAL
 
--- a/db/mork/src/morkAtom.h
+++ b/db/mork/src/morkAtom.h
@@ -279,17 +279,17 @@ class morkWeeBookAtom : public morkBookA
   // morkAtomSpace* mBookAtom_Space; // mBookAtom_Space->SpaceScope() is scope
   // mork_aid       mBookAtom_Id;    // identity token for this shared atom
 
 public:
   mork_u1     mWeeBookAtom_Body[ 1 ]; // 1st byte of immed content vector
 
 public: // empty construction does nothing
   morkWeeBookAtom() { }
-  morkWeeBookAtom(mork_aid inAid);
+  explicit morkWeeBookAtom(mork_aid inAid);
 
   void InitWeeBookAtom(morkEnv* ev, const morkBuf& inBuf,
     morkAtomSpace* ioSpace, mork_aid inAid);
 
   // allow extra trailing byte for a null byte:
   static mork_size SizeForFill(mork_fill inFill)
   { return sizeof(morkWeeBookAtom) + inFill; }
 
--- a/db/mork/src/morkBead.h
+++ b/db/mork/src/morkBead.h
@@ -57,17 +57,17 @@ public: // Hash() and Equal() for bead m
   { return ( mBead_Color == inBead->mBead_Color); }
 
 // { ===== begin morkNode interface =====
 public: // morkNode virtual methods
   virtual void CloseMorkNode(morkEnv* ev) override; // CloseBead() only if open
   virtual ~morkBead(); // assert that CloseBead() executed earlier
 
 public: // special case for stack construction for map usage:
-  morkBead(mork_color inBeadColor); // stack-based bead instance
+  explicit morkBead(mork_color inBeadColor); // stack-based bead instance
 
 protected: // special case for morkObject:
   morkBead(const morkUsage& inUsage, nsIMdbHeap* ioHeap,
     mork_color inBeadColor);
 
 public: // morkEnv construction & destruction
   morkBead(morkEnv* ev, const morkUsage& inUsage, nsIMdbHeap* ioHeap,
      mork_color inBeadColor);
--- a/db/mork/src/morkDeque.h
+++ b/db/mork/src/morkDeque.h
@@ -36,19 +36,19 @@ which are used interchangeably with the 
  * morkNext: linked list node for very simple, singly-linked list
  */
 
 class morkNext /*d*/ {
 public:
   morkNext*  mNext_Link;
 
 public:
-  morkNext(int inZero) : mNext_Link( 0 ) { }
+  explicit morkNext(int inZero) : mNext_Link( 0 ) { }
 
-  morkNext(morkNext* ioLink) : mNext_Link( ioLink ) { }
+  explicit morkNext(morkNext* ioLink) : mNext_Link( ioLink ) { }
 
   morkNext(); // mNext_Link( 0 ), { }
 
 public:
   morkNext*  GetNextLink() const { return mNext_Link; }
 
 public: // link memory management methods
   static void* MakeNewNext(size_t inSize, nsIMdbHeap& ioHeap, morkEnv* ev);
@@ -113,17 +113,17 @@ public:
  */
 
 class morkLink /*d*/ {
 public:
   morkLink*  mLink_Next;
   morkLink*  mLink_Prev;
 
 public:
-  morkLink(int inZero) : mLink_Next( 0 ), mLink_Prev( 0 ) { }
+  explicit morkLink(int inZero) : mLink_Next( 0 ), mLink_Prev( 0 ) { }
 
   morkLink(); // mLink_Next( 0 ), mLink_Prev( 0 ) { }
 
 public:
   morkLink*  Next() const { return mLink_Next; }
   morkLink*  Prev() const { return mLink_Prev; }
 
   void SelfRefer() { mLink_Next = mLink_Prev = this; }
--- a/db/mork/src/morkFactory.h
+++ b/db/mork/src/morkFactory.h
@@ -156,17 +156,17 @@ public: // morkFactory virtual methods
     const mdbOpenPolicy* inOpenPolicy, // runtime policies for using db
     nsIMdbStore** acqStore) override; // acquire new db store object
   // } ----- end store methods -----
 
 // } ===== end nsIMdbFactory methods =====
 
 public: // morkYarn construction & destruction
   morkFactory(); // uses orkinHeap
-  morkFactory(nsIMdbHeap* ioHeap); // caller supplied heap
+  explicit morkFactory(nsIMdbHeap* ioHeap); // caller supplied heap
   morkFactory(morkEnv* ev, const morkUsage& inUsage, nsIMdbHeap* ioHeap);
   void CloseFactory(morkEnv* ev); // called by CloseMorkNode();
 
 
 public: // morkNode memory management operators
   void* operator new(size_t inSize) CPP_THROW_NEW
   { return ::operator new(inSize); }
 
--- a/db/mork/src/morkNode.h
+++ b/db/mork/src/morkNode.h
@@ -51,17 +51,17 @@
 #define morkUsage_kPool    'p'
 #define morkUsage_kNone    'n'
 
 class morkUsage {
 public:
   mork_usage     mUsage_Code;  // kHeap, kStack, kMember, or kGhost
 
 public:
-  morkUsage(mork_usage inCode);
+  explicit morkUsage(mork_usage inCode);
 
   morkUsage(); // does nothing except maybe call EnsureReadyStaticUsage()
   void InitUsage( mork_usage inCode)
   { mUsage_Code = inCode; }
 
   ~morkUsage() { }
   mork_usage Code() const { return mUsage_Code; }
 
@@ -158,17 +158,17 @@ public: // morkNode memory management me
 public: // morkNode memory management operators
   void* operator new(size_t inSize, nsIMdbHeap& ioHeap, morkEnv* ev) CPP_THROW_NEW
   { return morkNode::MakeNew(inSize, ioHeap, ev); }
 
 
 protected: // construction without an anv needed for first env constructed:
   morkNode(const morkUsage& inUsage, nsIMdbHeap* ioHeap);
 
-  morkNode(mork_usage inCode); // usage == inCode, heap == nil
+  explicit morkNode(mork_usage inCode); // usage == inCode, heap == nil
 
 // { ===== begin basic node interface =====
 public: // morkNode virtual methods
   // virtual FlushMorkNode(morkEnv* ev, morkStream* ioStream);
   // virtual WriteMorkNode(morkEnv* ev, morkStream* ioStream);
 
   virtual ~morkNode(); // assert that CloseNode() executed earlier
   virtual void CloseMorkNode(morkEnv* ev); // CloseNode() only if open
--- a/db/mork/src/morkParser.cpp
+++ b/db/mork/src/morkParser.cpp
@@ -114,17 +114,17 @@ morkParser::morkParser(morkEnv* ev,
 , mParser_ColumnCoil(ev, ioSlotHeap)
 , mParser_StringCoil(ev, ioSlotHeap)
 
 , mParser_ScopeSpool(ev, &mParser_ScopeCoil)
 , mParser_ValueSpool(ev, &mParser_ValueCoil)
 , mParser_ColumnSpool(ev, &mParser_ColumnCoil)
 , mParser_StringSpool(ev, &mParser_StringCoil)
 
-, mParser_MidYarn(ev, morkUsage_kMember, ioSlotHeap)
+, mParser_MidYarn(ev, morkUsage(morkUsage_kMember), ioSlotHeap)
 {
   if ( inBytesPerParseSegment < morkParser_kMinGranularity )
     inBytesPerParseSegment = morkParser_kMinGranularity;
   else if ( inBytesPerParseSegment > morkParser_kMaxGranularity )
     inBytesPerParseSegment = morkParser_kMaxGranularity;
 
   mParser_MoreGranularity = inBytesPerParseSegment;
 
--- a/db/mork/src/morkRow.h
+++ b/db/mork/src/morkRow.h
@@ -90,17 +90,17 @@ public: // flags bit twiddling
   mork_bool IsRowDirty() const
   { return ( mRow_Flags & morkRow_kDirtyBit ) != 0; }
 
   mork_bool IsRowUsed() const
   { return mRow_GcUses != 0; }
 
 public: // other row methods
   morkRow( ) { }
-  morkRow(const mdbOid* inOid) :mRow_Oid(*inOid) { }
+  explicit morkRow(const mdbOid* inOid) :mRow_Oid(*inOid) { }
   void InitRow(morkEnv* ev, const mdbOid* inOid, morkRowSpace* ioSpace,
     mork_size inLength, morkPool* ioPool);
     // if inLength is nonzero, cells will be allocated from ioPool
 
   morkRowObject* AcquireRowObject(morkEnv* ev, morkStore* ioStore);
   nsIMdbRow* AcquireRowHandle(morkEnv* ev, morkStore* ioStore);
   nsIMdbCell* AcquireCellHandle(morkEnv* ev, morkCell* ioCell,
     mdb_column inColumn, mork_pos inPos);
--- a/mailnews/addrbook/src/nsAbBSDirectory.cpp
+++ b/mailnews/addrbook/src/nsAbBSDirectory.cpp
@@ -236,17 +236,17 @@ NS_IMETHODIMP nsAbBSDirectory::DeleteDir
   DIR_Server *server = nullptr;
   mServers.Get(directory, &server);
 
   if (!server)
     return NS_ERROR_FAILURE;
 
   struct GetDirectories
   {
-    GetDirectories(DIR_Server* aServer) : mServer(aServer) { }
+    explicit GetDirectories(DIR_Server* aServer) : mServer(aServer) { }
 
     nsCOMArray<nsIAbDirectory> directories;
     DIR_Server* mServer;
   };
   GetDirectories getDirectories(server);
   for (auto iter = mServers.Iter(); !iter.Done(); iter.Next()) {
     if (iter.UserData() == getDirectories.mServer) {
       nsCOMPtr<nsIAbDirectory> abDir = do_QueryInterface(iter.Key());
--- a/mailnews/addrbook/src/nsAbUtils.h
+++ b/mailnews/addrbook/src/nsAbUtils.h
@@ -10,17 +10,17 @@
 
 /*
  * Wrapper class to automatically free an array of
  * char* when class goes out of scope
  */
 class CharPtrArrayGuard
 {
 public:
-    CharPtrArrayGuard (bool freeElements = true) :
+    explicit CharPtrArrayGuard (bool freeElements = true) :
         mFreeElements (freeElements),
         mArray (0),
         mSize (0)
     {
     }
 
     ~CharPtrArrayGuard ()
     {
@@ -75,17 +75,17 @@ private:
 
 /*
  * Wrapper class to automatically free an array of
  * char16_t* when class goes out of scope
  */
 class PRUnicharPtrArrayGuard
 {
 public:
-    PRUnicharPtrArrayGuard (bool freeElements = true) :
+    explicit PRUnicharPtrArrayGuard (bool freeElements = true) :
         mFreeElements (freeElements),
         mArray (0),
         mSize (0)
     {
     }
 
     ~PRUnicharPtrArrayGuard ()
     {
--- a/mailnews/addrbook/src/nsAddrDatabase.cpp
+++ b/mailnews/addrbook/src/nsAddrDatabase.cpp
@@ -2311,17 +2311,17 @@ class nsAddrDBEnumerator : public nsSimp
       return NS_GET_IID(nsIAbCard);
     }
 
     // nsISimpleEnumerator methods:
     NS_DECL_NSISIMPLEENUMERATOR
     NS_DECL_NSIADDRDBLISTENER
 
     // nsAddrDBEnumerator methods:
-    nsAddrDBEnumerator(nsAddrDatabase* aDb);
+    explicit nsAddrDBEnumerator(nsAddrDatabase* aDb);
     void Clear();
   protected:
     ~nsAddrDBEnumerator() override;
     RefPtr<nsAddrDatabase> mDb;
     nsIMdbTable *mDbTable;
     nsCOMPtr<nsIMdbTableRowCursor> mRowCursor;
     nsCOMPtr<nsIMdbRow> mCurrentRow;
     mdb_pos mRowPos;
--- a/mailnews/base/search/public/nsMsgResultElement.h
+++ b/mailnews/base/search/public/nsMsgResultElement.h
@@ -15,17 +15,17 @@
 //---------------------------------------------------------------------------
 // nsMsgResultElement is a list of attribute/value pairs which are used to
 // represent a search hit without requiring a message header or server connection
 //---------------------------------------------------------------------------
 
 class nsMsgResultElement
 {
 public:
-  nsMsgResultElement (nsIMsgSearchAdapter *);
+  explicit nsMsgResultElement (nsIMsgSearchAdapter *);
   virtual ~nsMsgResultElement ();
 
   static nsresult AssignValues (nsIMsgSearchValue *src, nsMsgSearchValue *dst);
   nsresult GetValue (nsMsgSearchAttribValue, nsMsgSearchValue **) const;
   nsresult AddValue (nsIMsgSearchValue*);
     nsresult AddValue (nsMsgSearchValue*);
 
   nsresult GetPrettyName (nsMsgSearchValue**);
--- a/mailnews/base/search/public/nsMsgSearchBoolExpression.h
+++ b/mailnews/base/search/public/nsMsgSearchBoolExpression.h
@@ -36,17 +36,17 @@
    term methods.
  */
 
 class nsMsgSearchBoolExpression
 {
 public:
 
   // create a leaf node expression
-  nsMsgSearchBoolExpression(nsIMsgSearchTerm * aNewTerm,
+  explicit nsMsgSearchBoolExpression(nsIMsgSearchTerm * aNewTerm,
                               char * aEncodingString = NULL);
 
   // create a non-leaf node expression containing 2 expressions
     // and a boolean operator
   nsMsgSearchBoolExpression(nsMsgSearchBoolExpression *,
                               nsMsgSearchBoolExpression *,
                               nsMsgSearchBooleanOperator boolOp);
 
--- a/mailnews/base/search/src/nsMsgSearchValue.h
+++ b/mailnews/base/search/src/nsMsgSearchValue.h
@@ -6,17 +6,17 @@
 #ifndef __nsMsgSearchValue_h
 #define __nsMsgSearchValue_h
 
 #include "nsIMsgSearchValue.h"
 #include "nsMsgSearchCore.h"
 
 class nsMsgSearchValueImpl : public nsIMsgSearchValue {
   public:
-    nsMsgSearchValueImpl(nsMsgSearchValue *aInitialValue);
+    explicit nsMsgSearchValueImpl(nsMsgSearchValue *aInitialValue);
 
     NS_DECL_ISUPPORTS
     NS_DECL_NSIMSGSEARCHVALUE
 
   private:
     virtual ~nsMsgSearchValueImpl();
 
     nsMsgSearchValue mValue;
--- a/mailnews/base/src/nsMailDirProvider.h
+++ b/mailnews/base/src/nsMailDirProvider.h
@@ -30,17 +30,17 @@ private:
   public:
     const nsID& DefaultInterface() override
     {
       return NS_GET_IID(nsIFile);
     }
 
     NS_DECL_NSISIMPLEENUMERATOR
 
-    AppendingEnumerator(nsISimpleEnumerator* aBase);
+    explicit AppendingEnumerator(nsISimpleEnumerator* aBase);
 
   private:
     ~AppendingEnumerator() override = default;
     nsCOMPtr<nsISimpleEnumerator> mBase;
     nsCOMPtr<nsIFile>             mNext;
     nsCOMPtr<nsIFile>             mNextWithLocale;
     nsCString                     mLocale;
   };
--- a/mailnews/base/src/nsMsgCopyService.h
+++ b/mailnews/base/src/nsMsgCopyService.h
@@ -24,17 +24,17 @@ typedef enum _nsCopyRequestType
 } nsCopyRequestType;
 
 class nsCopyRequest;
 
 class nsCopySource
 {
 public:
     nsCopySource();
-    nsCopySource(nsIMsgFolder* srcFolder);
+    explicit nsCopySource(nsIMsgFolder* srcFolder);
     ~nsCopySource();
     void AddMessage(nsIMsgDBHdr* aMsg);
 
     nsCOMPtr<nsIMsgFolder> m_msgFolder;
     nsCOMPtr<nsIMutableArray> m_messageArray;
     bool m_processed;
 };
 
--- a/mailnews/base/src/nsMsgDBView.h
+++ b/mailnews/base/src/nsMsgDBView.h
@@ -549,17 +549,17 @@ private:
     {
       return NS_GET_IID(nsIMsgDBHdr);
     }
 
     // nsISimpleEnumerator methods:
     NS_DECL_NSISIMPLEENUMERATOR
 
     // nsMsgThreadEnumerator methods:
-    nsMsgViewHdrEnumerator(nsMsgDBView *view);
+    explicit nsMsgViewHdrEnumerator(nsMsgDBView *view);
 
     RefPtr<nsMsgDBView> m_view;
     nsMsgViewIndex m_curHdrIndex;
 
   private:
     ~nsMsgViewHdrEnumerator() override;
   };
 };
--- a/mailnews/base/src/nsMsgGroupThread.h
+++ b/mailnews/base/src/nsMsgGroupThread.h
@@ -16,17 +16,17 @@
 class nsMsgGroupView;
 
 class nsMsgGroupThread : public nsIMsgThread
 {
 public:
   friend class nsMsgGroupView;
 
   nsMsgGroupThread();
-  nsMsgGroupThread(nsIMsgDatabase *db);
+  explicit nsMsgGroupThread(nsIMsgDatabase *db);
 
   NS_DECL_NSIMSGTHREAD
   NS_DECL_ISUPPORTS
 
 protected:
   virtual ~nsMsgGroupThread();
 
   void      Init();
--- a/mailnews/base/src/nsMsgPrintEngine.cpp
+++ b/mailnews/base/src/nsMsgPrintEngine.cpp
@@ -646,17 +646,17 @@ nsMsgPrintEngine::PrintMsgWindow()
 //---------------------------------------------------------------
 //-- Event Notification
 //---------------------------------------------------------------
 
 //---------------------------------------------------------------
 class nsPrintMsgWindowEvent : public mozilla::Runnable
 {
 public:
-  nsPrintMsgWindowEvent(nsMsgPrintEngine *mpe)
+  explicit nsPrintMsgWindowEvent(nsMsgPrintEngine *mpe)
     : mozilla::Runnable("nsPrintMsgWindowEvent"), mMsgPrintEngine(mpe)
   {}
 
   NS_IMETHOD Run()
   {
     if (mMsgPrintEngine)
       mMsgPrintEngine->PrintMsgWindow();
     return NS_OK;
@@ -665,17 +665,17 @@ public:
 private:
   RefPtr<nsMsgPrintEngine> mMsgPrintEngine;
 };
 
 //-----------------------------------------------------------
 class nsStartNextPrintOpEvent : public mozilla::Runnable
 {
 public:
-  nsStartNextPrintOpEvent(nsMsgPrintEngine *mpe)
+  explicit nsStartNextPrintOpEvent(nsMsgPrintEngine *mpe)
     : mozilla::Runnable("nsStartNextPrintOpEvent"), mMsgPrintEngine(mpe)
   {}
 
   NS_IMETHOD Run()
   {
     if (mMsgPrintEngine)
       mMsgPrintEngine->StartNextPrintOperation();
     return NS_OK;
--- a/mailnews/base/util/nsMsgKeySet.h
+++ b/mailnews/base/util/nsMsgKeySet.h
@@ -75,17 +75,17 @@ public:
   nsresult ToMsgKeyArray(nsTArray<nsMsgKey> &aArray);
 
 #ifdef DEBUG
   static void RunTests();
 #endif
 
 protected:
   nsMsgKeySet(/* MSG_NewsHost* host */);
-  nsMsgKeySet(const char* /* , MSG_NewsHost* host */);
+  explicit nsMsgKeySet(const char* /* , MSG_NewsHost* host */);
   bool Grow();
   bool Optimize();
 
 #ifdef DEBUG
   static void test_decoder(const char*);
   static void test_adder();
   static void test_ranges();
   static void test_member(bool with_cache);
--- a/mailnews/base/util/nsMsgLineBuffer.h
+++ b/mailnews/base/util/nsMsgLineBuffer.h
@@ -45,17 +45,17 @@ public:
   nsresult    BufferInput(const char *net_buffer, int32_t net_buffer_size);
   // Not sure why anyone cares, by NNTPHost seems to want to know the buf pos.
   uint32_t    GetBufferPos() {return m_bufferPos;}
 
   virtual nsresult HandleLine(const char *line, uint32_t line_length);
   // flush last line, though it won't be CRLF terminated.
   virtual nsresult FlushLastLine();
 protected:
-  nsMsgLineBuffer(bool convertNewlinesP);
+  explicit nsMsgLineBuffer(bool convertNewlinesP);
 
   nsresult ConvertAndSendBuffer();
   void SetLookingForCRLF(bool b);
 
   nsMsgLineBufferHandler *m_handler;
   bool        m_convertNewlinesP;
   bool        m_lookingForCRLF;
 };
--- a/mailnews/compose/src/nsMsgSendLater.h
+++ b/mailnews/compose/src/nsMsgSendLater.h
@@ -24,17 +24,17 @@
 // to listen for message send completion and eventually notify the caller
 ////////////////////////////////////////////////////////////////////////////////////
 class nsMsgSendLater;
 
 class SendOperationListener : public nsIMsgSendListener,
                               public nsIMsgCopyServiceListener
 {
 public:
-  SendOperationListener(nsMsgSendLater *aSendLater);
+  explicit SendOperationListener(nsMsgSendLater *aSendLater);
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIMSGSENDLISTENER
   NS_DECL_NSIMSGCOPYSERVICELISTENER
 
 private:
   virtual ~SendOperationListener();
   RefPtr<nsMsgSendLater> mSendLater;
--- a/mailnews/compose/src/nsMsgSendPart.h
+++ b/mailnews/compose/src/nsMsgSendPart.h
@@ -17,17 +17,17 @@ class MimeEncoder;
 }
 
 typedef int (*MSG_SendPartWriteFunc)(const char* line, int32_t size,
                                      bool isheader, void* closure);
 
 class nsMsgSendPart {
   typedef mozilla::mailnews::MimeEncoder MimeEncoder;
 public:
-    nsMsgSendPart(nsIMsgSend* state, const char *part_charset = NULL);
+    explicit nsMsgSendPart(nsIMsgSend* state, const char *part_charset = NULL);
     virtual ~nsMsgSendPart();  // Note that the destructor also destroys
                                // any children that were added.
 
     virtual nsresult  Write();
 
     virtual nsresult    SetFile(nsIFile *filename);
     const nsIFile       *GetFile() {return m_file;}
 
--- a/mailnews/compose/src/nsSmtpProtocol.h
+++ b/mailnews/compose/src/nsSmtpProtocol.h
@@ -89,17 +89,17 @@ class nsSmtpProtocol : public nsMsgAsync
                        public nsIProtocolProxyCallback
 {
 public:
     NS_DECL_ISUPPORTS_INHERITED
     NS_DECL_MSGIOAUTH2MODULELISTENER
     NS_DECL_NSIPROTOCOLPROXYCALLBACK
 
     // Creating a protocol instance requires the URL which needs to be run.
-    nsSmtpProtocol(nsIURI * aURL);
+    explicit nsSmtpProtocol(nsIURI * aURL);
 
     virtual nsresult LoadUrl(nsIURI * aURL, nsISupports * aConsumer = nullptr) override;
     virtual nsresult SendData(const char * dataBuffer, bool aSuppressLogging = false) override;
 
     ////////////////////////////////////////////////////////////////////////////////////////
     // we support the nsIStreamListener interface
     ////////////////////////////////////////////////////////////////////////////////////////
 
--- a/mailnews/compose/src/nsURLFetcher.h
+++ b/mailnews/compose/src/nsURLFetcher.h
@@ -80,17 +80,17 @@ private:
 
 /**
  * Stream consumer used for handling special content type like multipart/x-mixed-replace
  */
 
 class nsURLFetcherStreamConsumer : public nsIStreamListener
 {
 public:
-  nsURLFetcherStreamConsumer(nsURLFetcher* urlFetcher);
+  explicit nsURLFetcherStreamConsumer(nsURLFetcher* urlFetcher);
 
   /* additional members */
   NS_DECL_ISUPPORTS
   NS_DECL_NSISTREAMLISTENER
   NS_DECL_NSIREQUESTOBSERVER
 
 private:
   virtual ~nsURLFetcherStreamConsumer();
--- a/mailnews/db/msgdb/public/nsDBFolderInfo.h
+++ b/mailnews/db/msgdb/public/nsDBFolderInfo.h
@@ -26,17 +26,17 @@ class nsMsgDatabase;
 // caching the values. If this somehow turns out to be prohibitively expensive, we can invent
 // some sort of dirty mechanism, but I think it turns out that these values will be cached by
 // the MSG_FolderInfo's anyway.
 class nsDBFolderInfo : public nsIDBFolderInfo
 {
 public:
   friend class nsMsgDatabase;
 
-  nsDBFolderInfo(nsMsgDatabase *mdb);
+  explicit nsDBFolderInfo(nsMsgDatabase *mdb);
 
   NS_DECL_ISUPPORTS
     // interface methods.
     NS_DECL_NSIDBFOLDERINFO
     // create the appropriate table and row in a new db.
     nsresult AddToNewMDB();
   // accessor methods.
 
--- a/mailnews/db/msgdb/src/nsMailDatabase.cpp
+++ b/mailnews/db/msgdb/src/nsMailDatabase.cpp
@@ -314,17 +314,17 @@ public:
   const nsID& DefaultInterface() override
   {
     return NS_GET_IID(nsIMsgOfflineImapOperation);
   }
 
   // nsISimpleEnumerator methods:
   NS_DECL_NSISIMPLEENUMERATOR
 
-  nsMsgOfflineOpEnumerator(nsMailDatabase* db);
+  explicit nsMsgOfflineOpEnumerator(nsMailDatabase* db);
 
 protected:
   ~nsMsgOfflineOpEnumerator() override;
   nsresult GetRowCursor();
   nsresult PrefetchNext();
   nsMailDatabase* mDB;
   nsIMdbTableRowCursor* mRowCursor;
   nsCOMPtr <nsIMsgOfflineImapOperation> mResultOp;
--- a/mailnews/db/msgdb/src/nsMsgDatabase.cpp
+++ b/mailnews/db/msgdb/src/nsMsgDatabase.cpp
@@ -1016,17 +1016,17 @@ namespace mozilla {
 namespace mailnews {
 
 MOZ_DEFINE_MALLOC_SIZE_OF(GetMallocSize)
 
 class MsgDBReporter final : public nsIMemoryReporter
 {
   nsMsgDatabase *mDatabase;
 public:
-  MsgDBReporter(nsMsgDatabase *db) : mDatabase(db) {}
+  explicit MsgDBReporter(nsMsgDatabase *db) : mDatabase(db) {}
 
   NS_DECL_ISUPPORTS
   NS_IMETHOD GetName(nsACString &aName)
   {
     aName.AssignLiteral("msg-database-objects");
     return NS_OK;
   }
 
--- a/mailnews/db/msgdb/src/nsMsgHdr.cpp
+++ b/mailnews/db/msgdb/src/nsMsgHdr.cpp
@@ -991,17 +991,17 @@ NS_IMETHODIMP nsMsgHdr::GetIsKilled(bool
 #include "nsAutoPtr.h"
 #define NULL_MORK_COLUMN 0
 class nsMsgPropertyEnumerator : public nsIUTF8StringEnumerator
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIUTF8STRINGENUMERATOR
 
-  nsMsgPropertyEnumerator(nsMsgHdr* aHdr);
+  explicit nsMsgPropertyEnumerator(nsMsgHdr* aHdr);
   void PrefetchNext();
 
 protected:
   virtual ~nsMsgPropertyEnumerator();
   nsCOMPtr<nsIMdbRowCellCursor> mRowCellCursor;
   nsCOMPtr<nsIMdbEnv> m_mdbEnv;
   nsCOMPtr<nsIMdbStore> m_mdbStore;
   // Hold a reference to the hdr so it will hold an xpcom reference to the
--- a/mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.cpp
+++ b/mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.cpp
@@ -930,17 +930,17 @@ public:
  */
 class TokenStreamListener : public nsIStreamListener, nsIMsgHeaderSink {
 public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSIREQUESTOBSERVER
     NS_DECL_NSISTREAMLISTENER
     NS_DECL_NSIMSGHEADERSINK
 
-    TokenStreamListener(TokenAnalyzer* analyzer);
+    explicit TokenStreamListener(TokenAnalyzer* analyzer);
 protected:
     virtual ~TokenStreamListener();
     TokenAnalyzer* mAnalyzer;
     char* mBuffer;
     uint32_t mBufferSize;
     uint32_t mLeftOverCount;
     Tokenizer mTokenizer;
     bool mSetAttachmentFlag;
--- a/mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.h
+++ b/mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.h
@@ -33,17 +33,17 @@ struct CorpusToken;
 /**
  * Helper class to enumerate Token objects in a PLDHashTable
  * safely and without copying (see bugzilla #174859). The
  * enumeration is safe to use until an Add()
  * or Remove() is performed on the table.
  */
 class TokenEnumeration {
 public:
-    TokenEnumeration(PLDHashTable* table);
+    explicit TokenEnumeration(PLDHashTable* table);
     bool hasMoreTokens();
     BaseToken* nextToken();
 
 private:
     PLDHashTable::Iterator mIterator;
 };
 
 // A trait is some aspect of a message, like being junk or tagged as
@@ -89,17 +89,17 @@ public:
      * Clears out the previous message tokens.
      */
     nsresult clearTokens();
     uint32_t countTokens();
     TokenEnumeration getTokens();
     BaseToken* add(const char* word);
 
 protected:
-    TokenHash(uint32_t entrySize);
+    explicit TokenHash(uint32_t entrySize);
     mozilla::ArenaAllocator<16384, 2> mWordPool;
     uint32_t mEntrySize;
     PLDHashTable mTokenTable;
     char* copyWord(const char* word, uint32_t len);
     BaseToken* get(const char* word);
 };
 
 class Tokenizer: public TokenHash {
--- a/mailnews/imap/src/nsAutoSyncState.h
+++ b/mailnews/imap/src/nsAutoSyncState.h
@@ -49,17 +49,17 @@ class MsgStrategyComparatorAdaptor
  */
 class nsAutoSyncState final : public nsIAutoSyncState, public nsIUrlListener
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIAUTOSYNCSTATE
   NS_DECL_NSIURLLISTENER
 
-  nsAutoSyncState(nsImapMailFolder *aOwnerFolder, PRTime aLastSyncTime = 0UL);
+  explicit nsAutoSyncState(nsImapMailFolder *aOwnerFolder, PRTime aLastSyncTime = 0UL);
 
   /// Called by owner folder when new headers are fetched from the server
   void OnNewHeaderFetchCompleted(const nsTArray<nsMsgKey> &aMsgKeyList);
 
   /// Sets the last sync time in lower precision (seconds)
   void SetLastSyncTimeInSec(int32_t aLastSyncTime);
 
   /// Manages storage space for auto-sync operations
--- a/mailnews/imap/src/nsImapFlagAndUidState.h
+++ b/mailnews/imap/src/nsImapFlagAndUidState.h
@@ -16,17 +16,17 @@ const int32_t kImapFlagAndUidStateSize =
 
 #include "nsBaseHashtable.h"
 #include "nsDataHashtable.h"
 
 class nsImapFlagAndUidState : public nsIImapFlagAndUidState
 {
 public:
     NS_DECL_THREADSAFE_ISUPPORTS
-    nsImapFlagAndUidState(int numberOfMessages);
+    explicit nsImapFlagAndUidState(int numberOfMessages);
 
     NS_DECL_NSIIMAPFLAGANDUIDSTATE
 
     int32_t               NumberOfDeletedMessages();
 
     imapMessageFlagsType  GetMessageFlagsFromUID(uint32_t uid, bool *foundIt, int32_t *ndx);
 
     bool         IsLastMessageUnseen(void);
--- a/mailnews/imap/src/nsImapMailFolder.cpp
+++ b/mailnews/imap/src/nsImapMailFolder.cpp
@@ -6332,17 +6332,17 @@ NS_IMETHODIMP nsImapMailFolder::GetOther
         nsIUTF8StringEnumerator** aResult)
 {
   return GetFolderACL()->GetOtherUsers(aResult);
 }
 
 class AdoptUTF8StringEnumerator final : public nsIUTF8StringEnumerator
 {
 public:
-  AdoptUTF8StringEnumerator(nsTArray<nsCString>* array) :
+  explicit AdoptUTF8StringEnumerator(nsTArray<nsCString>* array) :
     mStrings(array), mIndex(0)
   {}
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIUTF8STRINGENUMERATOR
 private:
   ~AdoptUTF8StringEnumerator()
   {
--- a/mailnews/imap/src/nsImapMailFolder.h
+++ b/mailnews/imap/src/nsImapMailFolder.h
@@ -106,17 +106,17 @@ class nsImapMailFolder;
 #define IMAP_ACL_ADMINISTER_FLAG 0x0000080 /* perform SETACL */
 #define IMAP_ACL_RETRIEVED_FLAG 0x0000100 /* ACL info for this folder has been initialized */
 #define IMAP_ACL_EXPUNGE_FLAG 0x0000200 // can EXPUNGE or do implicit EXPUNGE on CLOSE
 #define IMAP_ACL_DELETE_FOLDER 0x0000400 // can DELETE/RENAME folder
 
 class nsMsgIMAPFolderACL
 {
 public:
-  nsMsgIMAPFolderACL(nsImapMailFolder *folder);
+  explicit nsMsgIMAPFolderACL(nsImapMailFolder *folder);
   ~nsMsgIMAPFolderACL();
 
   bool SetFolderRightsForUser(const nsACString& userName, const nsACString& rights);
 
 public:
 
   // generic for any user, although we might not use them in
   // DO NOT use these for looking up information about the currently authenticated user.
--- a/mailnews/imap/src/nsImapProtocol.cpp
+++ b/mailnews/imap/src/nsImapProtocol.cpp
@@ -1012,30 +1012,30 @@ void nsImapProtocol::ReleaseUrlState(boo
     NS_ReleaseOnMainThreadSystemGroup("nsImapProtocol::m_runningUrl", mailnewsurl.forget());
   }
   saveFolderSink = nullptr;
 }
 
 
 class nsImapThreadShutdownEvent : public mozilla::Runnable {
 public:
-  nsImapThreadShutdownEvent(nsIThread *thread)
+  explicit nsImapThreadShutdownEvent(nsIThread *thread)
     : mozilla::Runnable("nsImapThreadShutdownEvent"), mThread(thread) {
   }
   NS_IMETHOD Run() {
     mThread->Shutdown();
     return NS_OK;
   }
 private:
   nsCOMPtr<nsIThread> mThread;
 };
 
 class nsImapCancelProxy : public mozilla::Runnable {
 public:
-  nsImapCancelProxy(nsICancelable *aProxyRequest)
+  explicit nsImapCancelProxy(nsICancelable *aProxyRequest)
     : mozilla::Runnable("nsImapCancelProxy"), m_proxyRequest(aProxyRequest) {
   }
   NS_IMETHOD Run() {
     m_proxyRequest->Cancel(NS_BINDING_ABORTED);
     return NS_OK;
   }
 private:
   nsCOMPtr<nsICancelable> m_proxyRequest;
@@ -9532,17 +9532,17 @@ nsresult nsImapMockChannel::ReadFromMemC
   }
 
   return rv;
 }
 
 class nsReadFromImapConnectionFailure : public mozilla::Runnable
 {
 public:
-  nsReadFromImapConnectionFailure(nsImapMockChannel *aChannel)
+  explicit nsReadFromImapConnectionFailure(nsImapMockChannel *aChannel)
     : mozilla::Runnable("nsReadFromImapConnectionFailure")
     , mImapMockChannel(aChannel)
   {}
 
   NS_IMETHOD Run()
   {
     if (mImapMockChannel) {
       mImapMockChannel->RunOnStopRequestFailure();
--- a/mailnews/imap/src/nsImapSearchResults.h
+++ b/mailnews/imap/src/nsImapSearchResults.h
@@ -20,17 +20,17 @@ public:
 
     friend class nsImapSearchResultIterator;
 private:
     nsImapSearchResultSequence();
 };
 
 class nsImapSearchResultIterator {
 public:
-    nsImapSearchResultIterator(nsImapSearchResultSequence &sequence);
+    explicit nsImapSearchResultIterator(nsImapSearchResultSequence &sequence);
     virtual ~nsImapSearchResultIterator();
 
     void  ResetIterator();
     int32_t GetNextMessageNumber();   // returns 0 at end of list
 private:
     nsImapSearchResultSequence &fSequence;
     int32_t fSequenceIndex;
     char  *fCurrentLine;
--- a/mailnews/imap/src/nsImapServerResponseParser.h
+++ b/mailnews/imap/src/nsImapServerResponseParser.h
@@ -20,17 +20,17 @@ class nsIMAPBodypart;
 class nsImapSearchResultIterator;
 class nsIImapFlagAndUidState;
 
 #include "nsIMAPGenericParser.h"
 
 class nsImapServerResponseParser : public nsIMAPGenericParser
 {
 public:
-  nsImapServerResponseParser(nsImapProtocol &imapConnection);
+  explicit nsImapServerResponseParser(nsImapProtocol &imapConnection);
   virtual ~nsImapServerResponseParser();
 
   // Overridden from the base parser class
   virtual bool       LastCommandSuccessful() override;
   virtual void HandleMemoryFailure() override;
 
   // aignoreBadAndNOResponses --> don't throw a error dialog if this command results in a NO or Bad response
   // from the server..in other words the command is "exploratory" and we don't really care if it succeeds or fails.
--- a/mailnews/imap/src/nsSyncRunnableHelpers.h
+++ b/mailnews/imap/src/nsSyncRunnableHelpers.h
@@ -18,17 +18,17 @@
 
 // The classes in this file proxy method calls to the main thread
 // synchronously. The main thread must not block on this thread, or a
 // deadlock condition can occur.
 
 class StreamListenerProxy final : public nsIStreamListener
 {
 public:
-  StreamListenerProxy(nsIStreamListener* receiver)
+  explicit StreamListenerProxy(nsIStreamListener* receiver)
     : mReceiver(receiver)
   {
     MOZ_DIAGNOSTIC_ASSERT(receiver, "Null receiver, crash now to get feedback instead of later");
   }
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIREQUESTOBSERVER
   NS_DECL_NSISTREAMLISTENER
@@ -38,17 +38,17 @@ private:
     NS_ReleaseOnMainThreadSystemGroup("StreamListenerProxy::mReceiver", mReceiver.forget());
   }
   nsCOMPtr<nsIStreamListener> mReceiver;
 };
 
 class ImapMailFolderSinkProxy final : public nsIImapMailFolderSink
 {
 public:
-  ImapMailFolderSinkProxy(nsIImapMailFolderSink* receiver)
+  explicit ImapMailFolderSinkProxy(nsIImapMailFolderSink* receiver)
     : mReceiver(receiver)
   {
     MOZ_DIAGNOSTIC_ASSERT(receiver, "Null receiver, crash now to get feedback instead of later");
   }
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIIMAPMAILFOLDERSINK
 
@@ -57,17 +57,17 @@ private:
     NS_ReleaseOnMainThreadSystemGroup("ImapMailFolderSinkProxy::mReceiver", mReceiver.forget());
   }
   nsCOMPtr<nsIImapMailFolderSink> mReceiver;
 };
 
 class ImapServerSinkProxy final : public nsIImapServerSink
 {
 public:
-  ImapServerSinkProxy(nsIImapServerSink* receiver)
+  explicit ImapServerSinkProxy(nsIImapServerSink* receiver)
     : mReceiver(receiver)
   {
     MOZ_DIAGNOSTIC_ASSERT(receiver, "Null receiver, crash now to get feedback instead of later");
   }
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIIMAPSERVERSINK
 
@@ -77,17 +77,17 @@ private:
   }
   nsCOMPtr<nsIImapServerSink> mReceiver;
 };
 
 
 class ImapMessageSinkProxy final : public nsIImapMessageSink
 {
 public:
-  ImapMessageSinkProxy(nsIImapMessageSink* receiver)
+  explicit ImapMessageSinkProxy(nsIImapMessageSink* receiver)
     : mReceiver(receiver)
   {
     MOZ_DIAGNOSTIC_ASSERT(receiver, "Null receiver, crash now to get feedback instead of later");
   }
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIIMAPMESSAGESINK
 
@@ -96,17 +96,17 @@ private:
     NS_ReleaseOnMainThreadSystemGroup("ImapMessageSinkProxy::mReceiver", mReceiver.forget());
   }
   nsCOMPtr<nsIImapMessageSink> mReceiver;
 };
 
 class ImapProtocolSinkProxy final : public nsIImapProtocolSink
 {
 public:
-  ImapProtocolSinkProxy(nsIImapProtocolSink* receiver)
+  explicit ImapProtocolSinkProxy(nsIImapProtocolSink* receiver)
     : mReceiver(receiver)
   {
     MOZ_DIAGNOSTIC_ASSERT(receiver, "Null receiver, crash now to get feedback instead of later");
   }
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIIMAPPROTOCOLSINK
 
@@ -121,17 +121,17 @@ class msgIOAuth2Module;
 class nsIMsgIncomingServer;
 
 namespace mozilla {
 namespace mailnews {
 
 class OAuth2ThreadHelper final : public msgIOAuth2ModuleListener
 {
 public:
-  OAuth2ThreadHelper(nsIMsgIncomingServer *aServer);
+  explicit OAuth2ThreadHelper(nsIMsgIncomingServer *aServer);
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_MSGIOAUTH2MODULELISTENER
 
   bool SupportsOAuth2();
   void GetXOAuth2String(nsACString &base64Str);
 
 private:
--- a/mailnews/import/src/nsImportFieldMap.h
+++ b/mailnews/import/src/nsImportFieldMap.h
@@ -19,17 +19,17 @@ class nsIStringBundle;
 
 class nsImportFieldMap : public nsIImportFieldMap
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
 
   NS_DECL_NSIIMPORTFIELDMAP
 
-  nsImportFieldMap(nsIStringBundle *aBundle);
+  explicit nsImportFieldMap(nsIStringBundle *aBundle);
 
   static nsresult Create(nsIStringBundle *aBundle, nsISupports *aOuter, REFNSIID aIID, void **aResult);
 
 private:
   virtual ~nsImportFieldMap();
   nsresult  Allocate(int32_t newSize);
 
 private:
--- a/mailnews/import/src/nsImportMail.cpp
+++ b/mailnews/import/src/nsImportMail.cpp
@@ -936,17 +936,17 @@ bool nsImportGenericMail::CreateFolder(n
  * A better design might be a co-routine-ish design where the ui thread
  * hands off each folder to the import thread and when the thread finishes
  * the folder, the main thread hands it the next folder.
  */
 
 class GetSubFoldersRunnable : public mozilla::Runnable
 {
 public:
-  GetSubFoldersRunnable(nsIMsgFolder *aFolder);
+  explicit GetSubFoldersRunnable(nsIMsgFolder *aFolder);
   NS_DECL_NSIRUNNABLE
   nsresult mResult;
 private:
   nsCOMPtr<nsIMsgFolder> m_folder;
 };
 
 GetSubFoldersRunnable::GetSubFoldersRunnable(nsIMsgFolder *aFolder) :
   mozilla::Runnable("GetSubFoldersRunnable"), m_folder(aFolder)
@@ -1151,17 +1151,17 @@ nsresult ProxyCreateSubfolder(nsIMsgFold
   nsresult rv = NS_DispatchToMainThread(createSubfolder, NS_DISPATCH_SYNC);
   NS_ENSURE_SUCCESS(rv, rv);
   return createSubfolder->mResult;
 }
 
 class ForceDBClosedRunnable : public mozilla::Runnable
 {
 public:
-  ForceDBClosedRunnable(nsIMsgFolder *aFolder);
+  explicit ForceDBClosedRunnable(nsIMsgFolder *aFolder);
   NS_DECL_NSIRUNNABLE
   nsresult mResult;
 protected:
   nsCOMPtr<nsIMsgFolder> m_folder;
 };
 
 ForceDBClosedRunnable::ForceDBClosedRunnable(nsIMsgFolder *aFolder) :
   mozilla::Runnable("ForceDBClosedRunnable"), m_folder(aFolder)
--- a/mailnews/import/text/src/nsTextImport.cpp
+++ b/mailnews/import/text/src/nsTextImport.cpp
@@ -37,17 +37,17 @@
 #define TEXTIMPORT_ADDRESS_SUCCESS       2003
 #define TEXTIMPORT_ADDRESS_BADPARAM      2004
 #define TEXTIMPORT_ADDRESS_BADSOURCEFILE 2005
 #define TEXTIMPORT_ADDRESS_CONVERTERROR  2006
 
 class ImportAddressImpl final : public nsIImportAddressBooks
 {
 public:
-  ImportAddressImpl(nsIStringBundle* aStringBundle);
+  explicit ImportAddressImpl(nsIStringBundle* aStringBundle);
 
   static nsresult Create(nsIImportAddressBooks** aImport,
                          nsIStringBundle *aStringBundle);
 
     // nsISupports interface
     NS_DECL_THREADSAFE_ISUPPORTS
 
     // nsIImportAddressBooks interface
--- a/mailnews/import/vcard/src/nsVCardImport.cpp
+++ b/mailnews/import/vcard/src/nsVCardImport.cpp
@@ -22,17 +22,17 @@
 #include "nsServiceManagerUtils.h"
 #include "nsTextFormatter.h"
 #include "nsVCardAddress.h"
 #include "nsVCardImport.h"
 
 class ImportVCardAddressImpl : public nsIImportAddressBooks
 {
 public:
-  ImportVCardAddressImpl(nsIStringBundle* aStringBundle);
+  explicit ImportVCardAddressImpl(nsIStringBundle* aStringBundle);
 
   static nsresult Create(
       nsIImportAddressBooks** aImport, nsIStringBundle* aStringBundle);
 
   // nsISupports interface
   NS_DECL_THREADSAFE_ISUPPORTS
 
   // nsIImportAddressBooks interface
--- a/mailnews/jsaccount/src/DelegateList.h
+++ b/mailnews/jsaccount/src/DelegateList.h
@@ -16,17 +16,17 @@ namespace mozilla {
 namespace mailnews {
 
 // This class provides a list of method names to delegate to another object.
 class DelegateList : public msgIDelegateList
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_MSGIDELEGATELIST
-  DelegateList(const char *aWindowsPrefix) :
+  explicit DelegateList(const char *aWindowsPrefix) :
     mPrefix(aWindowsPrefix)
   { }
   nsDataHashtable<nsCStringHashKey, bool> mMethods;
 
 protected:
   virtual ~DelegateList() { }
   nsCString mPrefix; // Windows decorated method prefix.
 };
--- a/mailnews/jsaccount/src/JaAbDirectory.h
+++ b/mailnews/jsaccount/src/JaAbDirectory.h
@@ -55,17 +55,17 @@ public:
 private:
   virtual ~JaCppAbDirectoryDelegator() {
   }
 
   class Super : public nsIAbDirectory,
                 public nsIInterfaceRequestor
   {
     public:
-      Super(JaCppAbDirectoryDelegator* aFakeThis) {mFakeThis = aFakeThis;}
+      explicit Super(JaCppAbDirectoryDelegator* aFakeThis) {mFakeThis = aFakeThis;}
       NS_DECL_ISUPPORTS
       NS_FORWARD_NSIABDIRECTORY(mFakeThis->JaBaseCppAbDirectory::)
       NS_FORWARD_NSIABCOLLECTION(mFakeThis->JaBaseCppAbDirectory::)
       NS_FORWARD_NSIABITEM(mFakeThis->JaBaseCppAbDirectory::)
       NS_FORWARD_NSIINTERFACEREQUESTOR(mFakeThis->JaBaseCppAbDirectory::)
     private:
       virtual ~Super() {}
       JaCppAbDirectoryDelegator* mFakeThis;
--- a/mailnews/jsaccount/src/JaCompose.h
+++ b/mailnews/jsaccount/src/JaCompose.h
@@ -57,17 +57,17 @@ private:
   }
 
   // This class will call a method on the delegator, but force the use of the
   // C++ cppBase class, bypassing any JS Delegate.
   class Super : public nsIMsgCompose,
                 public nsIInterfaceRequestor
   {
     public:
-      Super(JaCppComposeDelegator* aFakeThis) {mFakeThis = aFakeThis;}
+      explicit Super(JaCppComposeDelegator* aFakeThis) {mFakeThis = aFakeThis;}
       NS_DECL_ISUPPORTS
       // Forward all overridable methods, bypassing JS override.
       NS_FORWARD_NSIMSGCOMPOSE(mFakeThis->JaBaseCppCompose::)
       NS_FORWARD_NSIMSGSENDLISTENER(mFakeThis->JaBaseCppCompose::)
       NS_FORWARD_NSIINTERFACEREQUESTOR(mFakeThis->JaBaseCppCompose::)
     private:
       virtual ~Super() {};
       JaCppComposeDelegator* mFakeThis;
--- a/mailnews/jsaccount/src/JaIncomingServer.h
+++ b/mailnews/jsaccount/src/JaIncomingServer.h
@@ -60,17 +60,17 @@ private:
   }
 
   // This class will call a method on the delegator, but force the use of the
   // C++ parent class, bypassing any JS Delegate.
   class Super : public nsIMsgIncomingServer,
                 public nsIInterfaceRequestor
   {
     public:
-      Super(JaCppIncomingServerDelegator* aFakeThis) {mFakeThis = aFakeThis;}
+      explicit Super(JaCppIncomingServerDelegator* aFakeThis) {mFakeThis = aFakeThis;}
       NS_DECL_ISUPPORTS
       // Forward all overridable methods, bypassing JS override.
       NS_FORWARD_NSIMSGINCOMINGSERVER(mFakeThis->JaBaseCppIncomingServer::)
       NS_FORWARD_NSIINTERFACEREQUESTOR(mFakeThis->JaBaseCppIncomingServer::)
     private:
       virtual ~Super() {};
       JaCppIncomingServerDelegator* mFakeThis;
   };
--- a/mailnews/jsaccount/src/JaMsgFolder.h
+++ b/mailnews/jsaccount/src/JaMsgFolder.h
@@ -90,17 +90,17 @@ private:
                 public nsIJunkMailClassificationListener,
                 public nsIMsgTraitClassificationListener,
                 public nsIInterfaceRequestor
   {
     public:
       // Why fake this? Because this method is fully owned by
       // JaCppMsgFolderDelegator, and this reference is to the "this" of the
       // main method. But it is not really the local "this".
-      Super(JaCppMsgFolderDelegator* aFakeThis) {mFakeThis = aFakeThis;}
+      explicit Super(JaCppMsgFolderDelegator* aFakeThis) {mFakeThis = aFakeThis;}
       NS_DECL_ISUPPORTS
       NS_FORWARD_NSIMSGFOLDER(mFakeThis->JaBaseCppMsgFolder::)
       NS_FORWARD_NSIRDFRESOURCE(mFakeThis->JaBaseCppMsgFolder::)
       NS_FORWARD_NSIRDFNODE(mFakeThis->JaBaseCppMsgFolder::)
       NS_FORWARD_NSIDBCHANGELISTENER(mFakeThis->JaBaseCppMsgFolder::)
       NS_FORWARD_NSIURLLISTENER(mFakeThis->JaBaseCppMsgFolder::)
       NS_FORWARD_NSIJUNKMAILCLASSIFICATIONLISTENER(mFakeThis->JaBaseCppMsgFolder::)
       NS_FORWARD_NSIMSGTRAITCLASSIFICATIONLISTENER(mFakeThis->JaBaseCppMsgFolder::)
--- a/mailnews/jsaccount/src/JaSend.h
+++ b/mailnews/jsaccount/src/JaSend.h
@@ -61,17 +61,17 @@ private:
 
   // This class will call a method on the delegator, but force the use of the
   // C++ parent class, bypassing any JS Delegate.
   class Super : public nsIMsgSend,
                 public nsIMsgOperationListener,
                 public nsIInterfaceRequestor
   {
     public:
-      Super(JaCppSendDelegator* aFakeThis) {mFakeThis = aFakeThis;}
+      explicit Super(JaCppSendDelegator* aFakeThis) {mFakeThis = aFakeThis;}
       NS_DECL_ISUPPORTS
       // Forward all overridable methods, bypassing JS override.
       NS_FORWARD_NSIMSGSEND(mFakeThis->JaBaseCppSend::)
       NS_FORWARD_NSIMSGOPERATIONLISTENER(mFakeThis->JaBaseCppSend::)
       NS_FORWARD_NSIINTERFACEREQUESTOR(mFakeThis->JaBaseCppSend::)
     private:
       virtual ~Super() {};
       JaCppSendDelegator* mFakeThis;
--- a/mailnews/jsaccount/src/JaUrl.h
+++ b/mailnews/jsaccount/src/JaUrl.h
@@ -84,17 +84,17 @@ public:
   class Super : public nsIMsgMailNewsUrl,
                 public nsIURIWithSpecialOrigin,
                 public nsIMsgMessageUrl,
                 public msgIJaUrl,
                 public nsIInterfaceRequestor,
                 public nsISupportsWeakReference
   {
     public:
-      Super(JaCppUrlDelegator *aFakeThis) {mFakeThis = aFakeThis;}
+      explicit Super(JaCppUrlDelegator *aFakeThis) {mFakeThis = aFakeThis;}
       NS_DECL_ISUPPORTS
       NS_FORWARD_NSIMSGMAILNEWSURL(mFakeThis->JaBaseCppUrl::)
       NS_FORWARD_NSIURI(mFakeThis->JaBaseCppUrl::)
       NS_FORWARD_NSIURL(mFakeThis->JaBaseCppUrl::)
       NS_FORWARD_NSIURIWITHSPECIALORIGIN(mFakeThis->JaBaseCppUrl::)
       NS_FORWARD_NSIMSGMESSAGEURL(mFakeThis->JaBaseCppUrl::)
       NS_FORWARD_MSGIJAURL(mFakeThis->JaBaseCppUrl::)
       NS_FORWARD_NSIINTERFACEREQUESTOR(mFakeThis->JaBaseCppUrl::)
--- a/mailnews/local/src/nsMailboxProtocol.h
+++ b/mailnews/local/src/nsMailboxProtocol.h
@@ -43,17 +43,17 @@ typedef enum _MailboxStatesEnum {
 
 class nsMsgLineStreamBuffer;
 
 class nsMailboxProtocol : public nsMsgProtocol
 {
 public:
   // Creating a protocol instance requires the URL which needs to be run AND it requires
   // a transport layer.
-  nsMailboxProtocol(nsIURI * aURL);
+  explicit nsMailboxProtocol(nsIURI * aURL);
   virtual ~nsMailboxProtocol();
 
   // initialization function given a new url and transport layer
   nsresult Initialize(nsIURI * aURL);
 
   // the consumer of the url might be something like an nsIDocShell....
   virtual nsresult LoadUrl(nsIURI * aURL, nsISupports * aConsumer) override;
 
--- a/mailnews/local/src/nsParseMailbox.h
+++ b/mailnews/local/src/nsParseMailbox.h
@@ -126,17 +126,17 @@ public:
 protected:
   virtual ~nsParseMailMessageState();
 };
 
 // This class is part of the mailbox parsing state machine
 class nsMsgMailboxParser : public nsIStreamListener, public nsParseMailMessageState, public nsMsgLineBuffer
 {
 public:
-  nsMsgMailboxParser(nsIMsgFolder *);
+  explicit nsMsgMailboxParser(nsIMsgFolder *);
   nsMsgMailboxParser();
   nsresult Init();
 
   bool    IsRunningUrl() { return m_urlInProgress;} // returns true if we are currently running a url and false otherwise...
   NS_DECL_ISUPPORTS_INHERITED
 
   ////////////////////////////////////////////////////////////////////////////////////////
   // we support the nsIStreamListener interface
--- a/mailnews/local/src/nsPop3Protocol.h
+++ b/mailnews/local/src/nsPop3Protocol.h
@@ -245,17 +245,17 @@ typedef struct _Pop3ConData {
 
 
 class nsPop3Protocol : public nsMsgProtocol,
                        public nsIPop3Protocol,
                        public nsIMsgAsyncPromptListener,
                        public nsIProtocolProxyCallback
 {
 public:
-  nsPop3Protocol(nsIURI* aURL);
+  explicit nsPop3Protocol(nsIURI* aURL);
 
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSIPOP3PROTOCOL
   NS_DECL_NSIMSGASYNCPROMPTLISTENER
   NS_DECL_NSIPROTOCOLPROXYCALLBACK
 
   nsresult Initialize(nsIURI * aURL);
   nsresult InitializeInternal(nsIProxyInfo* proxyInfo);
--- a/mailnews/mime/public/MimeHeaderParser.h
+++ b/mailnews/mime/public/MimeHeaderParser.h
@@ -42,17 +42,17 @@ void DoConversion(const nsTArray<nsStrin
  * It works by internally providing an nsTArray<nsString> which it uses for its
  * external API operations. If the user requests an array of nsCString elements
  * instead, it converts the UTF-16 array to a UTF-8 array on destruction.
  */
 template <uint32_t N = 5>
 class UTF16ArrayAdapter
 {
 public:
-  UTF16ArrayAdapter(nsTArray<nsCString> &aUTF8Array)
+  explicit UTF16ArrayAdapter(nsTArray<nsCString> &aUTF8Array)
   : mUTF8Array(aUTF8Array) {}
   ~UTF16ArrayAdapter() { detail::DoConversion(mUTF16Array, mUTF8Array); }
   operator nsTArray<nsString>&() { return mUTF16Array; }
 private:
   nsTArray<nsCString> &mUTF8Array;
   AutoTArray<nsString, N> mUTF16Array;
 };
 
--- a/mailnews/mime/src/nsCMS.h
+++ b/mailnews/mime/src/nsCMS.h
@@ -23,17 +23,17 @@ class nsCMSMessage : public nsICMSMessag
                      public nsICMSMessage2
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSICMSMESSAGE
   NS_DECL_NSICMSMESSAGE2
 
   nsCMSMessage();
-  nsCMSMessage(NSSCMSMessage* aCMSMsg);
+  explicit nsCMSMessage(NSSCMSMessage* aCMSMsg);
   nsresult Init();
 
   void referenceContext(nsIInterfaceRequestor* aContext) {m_ctx = aContext;}
   NSSCMSMessage* getCMS() {return m_cmsMsg;}
 private:
   virtual ~nsCMSMessage();
   nsCOMPtr<nsIInterfaceRequestor> m_ctx;
   NSSCMSMessage * m_cmsMsg;
--- a/mailnews/mime/src/nsSimpleMimeConverterStub.cpp
+++ b/mailnews/mime/src/nsSimpleMimeConverterStub.cpp
@@ -159,17 +159,17 @@ MimeSimpleStubClassInitialize(MimeSimple
     oclass->initialize = Initialize;
     oclass->finalize = Finalize;
     return 0;
 }
 
 class nsSimpleMimeConverterStub : public nsIMimeContentTypeHandler
 {
 public:
-    nsSimpleMimeConverterStub(const char *aContentType) : mContentType(aContentType) { }
+    explicit nsSimpleMimeConverterStub(const char *aContentType) : mContentType(aContentType) { }
 
     NS_DECL_ISUPPORTS
 
     NS_IMETHOD GetContentType(char **contentType) override
     {
         *contentType = ToNewCString(mContentType);
         return *contentType ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
     }