summaryrefslogtreecommitdiffstats
path: root/mailnews/base/src
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2019-11-10 19:11:03 -0500
committerMatt A. Tobin <email@mattatobin.com>2019-11-10 19:11:03 -0500
commit201683afe4596ae32f7b1ea12dfca52995d59f9d (patch)
tree8632173f59a85d1c3bf679653de7957a59c96eae /mailnews/base/src
parent4db1ae892bad565e8e59ec6034b4c98946077248 (diff)
downloadUXP-201683afe4596ae32f7b1ea12dfca52995d59f9d.tar
UXP-201683afe4596ae32f7b1ea12dfca52995d59f9d.tar.gz
UXP-201683afe4596ae32f7b1ea12dfca52995d59f9d.tar.lz
UXP-201683afe4596ae32f7b1ea12dfca52995d59f9d.tar.xz
UXP-201683afe4596ae32f7b1ea12dfca52995d59f9d.zip
Bug 1487082 - Resolve potential for build bustage regarding bad implicit conversion constructors
* Part 1: make conversion CTORs explicit. Minor tweaks to conform with new(ish) static analysis rule which flags up implicit single-argument conversion constructors. * Part 2: fix a couple of double-mRefCnt declaration errors. * Part 3: Fix unsafe use of NS_ConvertASCIItoUTF16(). Tag #1273
Diffstat (limited to 'mailnews/base/src')
-rw-r--r--mailnews/base/src/nsMailDirProvider.h2
-rw-r--r--mailnews/base/src/nsMsgCopyService.h2
-rw-r--r--mailnews/base/src/nsMsgDBView.h2
-rw-r--r--mailnews/base/src/nsMsgGroupThread.h2
-rw-r--r--mailnews/base/src/nsMsgPrintEngine.cpp4
5 files changed, 6 insertions, 6 deletions
diff --git a/mailnews/base/src/nsMailDirProvider.h b/mailnews/base/src/nsMailDirProvider.h
index d12876d89..613551a79 100644
--- a/mailnews/base/src/nsMailDirProvider.h
+++ b/mailnews/base/src/nsMailDirProvider.h
@@ -29,7 +29,7 @@ private:
NS_DECL_ISUPPORTS
NS_DECL_NSISIMPLEENUMERATOR
- AppendingEnumerator(nsISimpleEnumerator* aBase);
+ explicit AppendingEnumerator(nsISimpleEnumerator* aBase);
private:
~AppendingEnumerator() {}
diff --git a/mailnews/base/src/nsMsgCopyService.h b/mailnews/base/src/nsMsgCopyService.h
index dfb9acc7a..8df9ccff5 100644
--- a/mailnews/base/src/nsMsgCopyService.h
+++ b/mailnews/base/src/nsMsgCopyService.h
@@ -29,7 +29,7 @@ class nsCopySource
{
public:
nsCopySource();
- nsCopySource(nsIMsgFolder* srcFolder);
+ explicit nsCopySource(nsIMsgFolder* srcFolder);
~nsCopySource();
void AddMessage(nsIMsgDBHdr* aMsg);
diff --git a/mailnews/base/src/nsMsgDBView.h b/mailnews/base/src/nsMsgDBView.h
index 6dcbbea3b..feba5f14f 100644
--- a/mailnews/base/src/nsMsgDBView.h
+++ b/mailnews/base/src/nsMsgDBView.h
@@ -500,7 +500,7 @@ private:
NS_DECL_NSISIMPLEENUMERATOR
// nsMsgThreadEnumerator methods:
- nsMsgViewHdrEnumerator(nsMsgDBView *view);
+ explicit nsMsgViewHdrEnumerator(nsMsgDBView *view);
RefPtr<nsMsgDBView> m_view;
nsMsgViewIndex m_curHdrIndex;
diff --git a/mailnews/base/src/nsMsgGroupThread.h b/mailnews/base/src/nsMsgGroupThread.h
index 3d1cb4fb4..076d7432a 100644
--- a/mailnews/base/src/nsMsgGroupThread.h
+++ b/mailnews/base/src/nsMsgGroupThread.h
@@ -21,7 +21,7 @@ public:
friend class nsMsgGroupView;
nsMsgGroupThread();
- nsMsgGroupThread(nsIMsgDatabase *db);
+ explicit nsMsgGroupThread(nsIMsgDatabase *db);
NS_DECL_NSIMSGTHREAD
NS_DECL_ISUPPORTS
diff --git a/mailnews/base/src/nsMsgPrintEngine.cpp b/mailnews/base/src/nsMsgPrintEngine.cpp
index d2f8157ed..2a509f380 100644
--- a/mailnews/base/src/nsMsgPrintEngine.cpp
+++ b/mailnews/base/src/nsMsgPrintEngine.cpp
@@ -653,7 +653,7 @@ nsMsgPrintEngine::PrintMsgWindow()
class nsPrintMsgWindowEvent : public mozilla::Runnable
{
public:
- nsPrintMsgWindowEvent(nsMsgPrintEngine *mpe)
+ explicit nsPrintMsgWindowEvent(nsMsgPrintEngine *mpe)
: mMsgPrintEngine(mpe)
{}
@@ -672,7 +672,7 @@ private:
class nsStartNextPrintOpEvent : public mozilla::Runnable
{
public:
- nsStartNextPrintOpEvent(nsMsgPrintEngine *mpe)
+ explicit nsStartNextPrintOpEvent(nsMsgPrintEngine *mpe)
: mMsgPrintEngine(mpe)
{}