Bug 1319408 - Replace default bodies of special member functions with = default; in embedding/. draft
authorAndi-Bogdan Postelnicu <bpostelnicu@mozilla.com>
Tue, 22 Nov 2016 14:56:19 +0200
changeset 442388 5988b50680935c9193c347aff787d1c48c396976
parent 442387 a366a657a5c58c9aa6845209561c4ee40e9c6172
child 442389 d432c58014a0be48992b5151df8c038d44b385ad
push id36698
push userbmo:bpostelnicu@mozilla.com
push dateTue, 22 Nov 2016 13:14:55 +0000
bugs1319408
milestone53.0a1
Bug 1319408 - Replace default bodies of special member functions with = default; in embedding/. MozReview-Commit-ID: HUOfzBiwxBB
embedding/components/appstartup/nsAppStartupNotifier.cpp
embedding/components/printingui/mac/nsPrintingPromptServiceX.mm
embedding/components/webbrowserpersist/WebBrowserPersistDocumentChild.cpp
embedding/components/webbrowserpersist/WebBrowserPersistLocalDocument.cpp
embedding/components/webbrowserpersist/WebBrowserPersistResourcesChild.cpp
embedding/components/webbrowserpersist/WebBrowserPersistResourcesParent.cpp
embedding/components/webbrowserpersist/WebBrowserPersistSerializeChild.cpp
embedding/components/webbrowserpersist/WebBrowserPersistSerializeParent.cpp
embedding/components/webbrowserpersist/nsWebBrowserPersist.cpp
--- 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());