Bug 1319408 - Replace default bodies of special member functions with = default; in embedding/.
MozReview-Commit-ID: HUOfzBiwxBB
--- a/embedding/components/appstartup/nsAppStartupNotifier.cpp
+++ b/embedding/components/appstartup/nsAppStartupNotifier.cpp
@@ -14,19 +14,17 @@
#include "nsISimpleEnumerator.h"
NS_IMPL_ISUPPORTS(nsAppStartupNotifier, nsIObserver)
nsAppStartupNotifier::nsAppStartupNotifier()
{
}
-nsAppStartupNotifier::~nsAppStartupNotifier()
-{
-}
+nsAppStartupNotifier::~nsAppStartupNotifier() = default;
NS_IMETHODIMP nsAppStartupNotifier::Observe(nsISupports *aSubject, const char *aTopic, const char16_t *someData)
{
NS_ENSURE_ARG(aTopic);
nsresult rv;
// now initialize all startup listeners
nsCOMPtr<nsICategoryManager> categoryManager =
--- a/embedding/components/printingui/mac/nsPrintingPromptServiceX.mm
+++ b/embedding/components/printingui/mac/nsPrintingPromptServiceX.mm
@@ -19,19 +19,17 @@
//*****************************************************************************
NS_IMPL_ISUPPORTS(nsPrintingPromptService, nsIPrintingPromptService, nsIWebProgressListener)
nsPrintingPromptService::nsPrintingPromptService()
{
}
-nsPrintingPromptService::~nsPrintingPromptService()
-{
-}
+nsPrintingPromptService::~nsPrintingPromptService() = default;
nsresult nsPrintingPromptService::Init()
{
return NS_OK;
}
//*****************************************************************************
// nsPrintingPromptService::nsIPrintingPromptService
--- a/embedding/components/webbrowserpersist/WebBrowserPersistDocumentChild.cpp
+++ b/embedding/components/webbrowserpersist/WebBrowserPersistDocumentChild.cpp
@@ -14,19 +14,17 @@
#include "WebBrowserPersistSerializeChild.h"
namespace mozilla {
WebBrowserPersistDocumentChild::WebBrowserPersistDocumentChild()
{
}
-WebBrowserPersistDocumentChild::~WebBrowserPersistDocumentChild()
-{
-}
+WebBrowserPersistDocumentChild::~WebBrowserPersistDocumentChild() = default;
void
WebBrowserPersistDocumentChild::Start(nsIDocument* aDocument)
{
RefPtr<WebBrowserPersistLocalDocument> doc;
if (aDocument) {
doc = new WebBrowserPersistLocalDocument(aDocument);
}
--- a/embedding/components/webbrowserpersist/WebBrowserPersistLocalDocument.cpp
+++ b/embedding/components/webbrowserpersist/WebBrowserPersistLocalDocument.cpp
@@ -73,19 +73,17 @@ NS_IMPL_CYCLE_COLLECTION(WebBrowserPersi
WebBrowserPersistLocalDocument::WebBrowserPersistLocalDocument(nsIDocument* aDocument)
: mDocument(aDocument)
, mPersistFlags(0)
{
MOZ_ASSERT(mDocument);
}
-WebBrowserPersistLocalDocument::~WebBrowserPersistLocalDocument()
-{
-}
+WebBrowserPersistLocalDocument::~WebBrowserPersistLocalDocument() = default;
NS_IMETHODIMP
WebBrowserPersistLocalDocument::SetPersistFlags(uint32_t aFlags)
{
mPersistFlags = aFlags;
return NS_OK;
}
@@ -647,17 +645,17 @@ class PersistNodeFixup final : public ns
public:
PersistNodeFixup(WebBrowserPersistLocalDocument* aParent,
nsIWebBrowserPersistURIMap* aMap,
nsIURI* aTargetURI);
NS_DECL_ISUPPORTS
NS_DECL_NSIDOCUMENTENCODERNODEFIXUP
private:
- virtual ~PersistNodeFixup() { }
+ virtual ~PersistNodeFixup() = default;
RefPtr<WebBrowserPersistLocalDocument> mParent;
nsClassHashtable<nsCStringHashKey, nsCString> mMap;
nsCOMPtr<nsIURI> mCurrentBaseURI;
nsCOMPtr<nsIURI> mTargetBaseURI;
bool IsFlagSet(uint32_t aFlag) const {
return mParent->GetPersistFlags() & aFlag;
}
--- a/embedding/components/webbrowserpersist/WebBrowserPersistResourcesChild.cpp
+++ b/embedding/components/webbrowserpersist/WebBrowserPersistResourcesChild.cpp
@@ -13,19 +13,17 @@ namespace mozilla {
NS_IMPL_ISUPPORTS(WebBrowserPersistResourcesChild,
nsIWebBrowserPersistResourceVisitor)
WebBrowserPersistResourcesChild::WebBrowserPersistResourcesChild()
{
}
-WebBrowserPersistResourcesChild::~WebBrowserPersistResourcesChild()
-{
-}
+WebBrowserPersistResourcesChild::~WebBrowserPersistResourcesChild() = default;
NS_IMETHODIMP
WebBrowserPersistResourcesChild::VisitResource(nsIWebBrowserPersistDocument *aDocument,
const nsACString& aURI)
{
nsCString copiedURI(aURI); // Yay, XPIDL/IPDL mismatch.
SendVisitResource(copiedURI);
return NS_OK;
--- a/embedding/components/webbrowserpersist/WebBrowserPersistResourcesParent.cpp
+++ b/embedding/components/webbrowserpersist/WebBrowserPersistResourcesParent.cpp
@@ -18,19 +18,17 @@ WebBrowserPersistResourcesParent::WebBro
nsIWebBrowserPersistResourceVisitor* aVisitor)
: mDocument(aDocument)
, mVisitor(aVisitor)
{
MOZ_ASSERT(aDocument);
MOZ_ASSERT(aVisitor);
}
-WebBrowserPersistResourcesParent::~WebBrowserPersistResourcesParent()
-{
-}
+WebBrowserPersistResourcesParent::~WebBrowserPersistResourcesParent() = default;
void
WebBrowserPersistResourcesParent::ActorDestroy(ActorDestroyReason aWhy)
{
if (aWhy != Deletion && mVisitor) {
// See comment in WebBrowserPersistDocumentParent::ActorDestroy
// (or bug 1202887) for why this is deferred.
nsCOMPtr<nsIRunnable> errorLater = NewRunnableMethod
--- a/embedding/components/webbrowserpersist/WebBrowserPersistSerializeChild.cpp
+++ b/embedding/components/webbrowserpersist/WebBrowserPersistSerializeChild.cpp
@@ -18,19 +18,17 @@ NS_IMPL_ISUPPORTS(WebBrowserPersistSeria
nsIWebBrowserPersistURIMap,
nsIOutputStream)
WebBrowserPersistSerializeChild::WebBrowserPersistSerializeChild(const WebBrowserPersistURIMap& aMap)
: mMap(aMap)
{
}
-WebBrowserPersistSerializeChild::~WebBrowserPersistSerializeChild()
-{
-}
+WebBrowserPersistSerializeChild::~WebBrowserPersistSerializeChild() = default;
NS_IMETHODIMP
WebBrowserPersistSerializeChild::OnFinish(nsIWebBrowserPersistDocument* aDocument,
nsIOutputStream* aStream,
const nsACString& aContentType,
nsresult aStatus)
{
MOZ_ASSERT(aStream == this);
--- a/embedding/components/webbrowserpersist/WebBrowserPersistSerializeParent.cpp
+++ b/embedding/components/webbrowserpersist/WebBrowserPersistSerializeParent.cpp
@@ -20,19 +20,17 @@ WebBrowserPersistSerializeParent::WebBro
, mFinish(aFinish)
, mOutputError(NS_OK)
{
MOZ_ASSERT(aDocument);
MOZ_ASSERT(aStream);
MOZ_ASSERT(aFinish);
}
-WebBrowserPersistSerializeParent::~WebBrowserPersistSerializeParent()
-{
-}
+WebBrowserPersistSerializeParent::~WebBrowserPersistSerializeParent() = default;
mozilla::ipc::IPCResult
WebBrowserPersistSerializeParent::RecvWriteData(nsTArray<uint8_t>&& aData)
{
if (NS_FAILED(mOutputError)) {
return IPC_OK();
}
--- a/embedding/components/webbrowserpersist/nsWebBrowserPersist.cpp
+++ b/embedding/components/webbrowserpersist/nsWebBrowserPersist.cpp
@@ -165,17 +165,17 @@ public:
NS_DECL_NSIWEBBROWSERPERSISTRESOURCEVISITOR
NS_DECL_ISUPPORTS
private:
RefPtr<nsWebBrowserPersist> mParent;
nsCOMPtr<nsIURI> mFile;
nsCOMPtr<nsIFile> mDataPath;
- virtual ~OnWalk() { }
+ virtual ~OnWalk() = default;
};
NS_IMPL_ISUPPORTS(nsWebBrowserPersist::OnWalk,
nsIWebBrowserPersistResourceVisitor)
class nsWebBrowserPersist::OnWrite final
: public nsIWebBrowserPersistWriteCompletion
{
@@ -190,17 +190,17 @@ public:
NS_DECL_NSIWEBBROWSERPERSISTWRITECOMPLETION
NS_DECL_ISUPPORTS
private:
RefPtr<nsWebBrowserPersist> mParent;
nsCOMPtr<nsIURI> mFile;
nsCOMPtr<nsIFile> mLocalFile;
- virtual ~OnWrite() { }
+ virtual ~OnWrite() = default;
};
NS_IMPL_ISUPPORTS(nsWebBrowserPersist::OnWrite,
nsIWebBrowserPersistWriteCompletion)
class nsWebBrowserPersist::FlatURIMap final
: public nsIWebBrowserPersistURIMap
{
@@ -216,17 +216,17 @@ public:
NS_DECL_NSIWEBBROWSERPERSISTURIMAP
NS_DECL_ISUPPORTS
private:
nsTArray<nsCString> mMapFrom;
nsTArray<nsCString> mMapTo;
nsCString mTargetBase;
- virtual ~FlatURIMap() { }
+ virtual ~FlatURIMap() = default;
};
NS_IMPL_ISUPPORTS(nsWebBrowserPersist::FlatURIMap, nsIWebBrowserPersistURIMap)
NS_IMETHODIMP
nsWebBrowserPersist::FlatURIMap::GetNumMappedURIs(uint32_t* aNum)
{
MOZ_ASSERT(mMapFrom.Length() == mMapTo.Length());