Bug 1311669 - replace default bodies of special member functions with = default; draft
authorAndi-Bogdan Postelnicu <bpostelnicu@mozilla.com>
Tue, 01 Nov 2016 14:44:09 +0200
changeset 432193 b7e12a9a2fb010712af4a1865f722498c7013c1b
parent 432192 400ea67cf10699fc9b7581b42286a7a767415dfa
child 432194 7fc20660d51d58cdc6582667f8e0ee3ea990096e
push id34230
push userbmo:bpostelnicu@mozilla.com
push dateTue, 01 Nov 2016 12:45:01 +0000
bugs1311669
milestone52.0a1
Bug 1311669 - replace default bodies of special member functions with = default; MozReview-Commit-ID: YxHWVHUyDq
netwerk/cookie/nsCookieService.cpp
netwerk/dns/DNS.cpp
netwerk/dns/nsDNSService2.cpp
netwerk/dns/nsHostResolver.cpp
netwerk/mime/nsMIMEHeaderParamImpl.cpp
netwerk/protocol/http/ASpdySession.cpp
netwerk/sctp/datachannel/DataChannel.cpp
netwerk/streamconv/nsStreamConverterService.cpp
netwerk/system/mac/nsNetworkLinkService.mm
netwerk/test/TestBind.cpp
netwerk/test/TestDNS.cpp
netwerk/test/TestIncrementalDownload.cpp
netwerk/test/TestProtocols.cpp
netwerk/test/TestServ.cpp
netwerk/test/TestStreamLoader.cpp
netwerk/test/TestUDPSocket.cpp
netwerk/test/TestUpload.cpp
--- a/netwerk/cookie/nsCookieService.cpp
+++ b/netwerk/cookie/nsCookieService.cpp
@@ -140,19 +140,17 @@ struct nsCookieAttributes
 };
 
 // stores the nsCookieEntry entryclass and an index into the cookie array
 // within that entryclass, for purposes of storing an iteration state that
 // points to a certain cookie.
 struct nsListIter
 {
   // default (non-initializing) constructor.
-  nsListIter()
-  {
-  }
+  nsListIter() = default;
 
   // explicit constructor to a given iterator state with entryclass 'aEntry'
   // and index 'aIndex'.
   explicit
   nsListIter(nsCookieEntry *aEntry, nsCookieEntry::IndexType aIndex)
    : entry(aEntry)
    , index(aIndex)
   {
@@ -365,17 +363,17 @@ public:
  * InsertCookieDBListener impl:
  * mozIStorageStatementCallback used to track asynchronous insertion operations.
  ******************************************************************************/
 class InsertCookieDBListener final : public DBListenerErrorHandler
 {
 private:
   virtual const char *GetOpType() override { return "INSERT"; }
 
-  ~InsertCookieDBListener() {}
+  ~InsertCookieDBListener() = default;
 
 public:
   NS_DECL_ISUPPORTS
 
   explicit InsertCookieDBListener(DBState* dbState) : DBListenerErrorHandler(dbState) { }
   NS_IMETHOD HandleResult(mozIStorageResultSet*) override
   {
     NS_NOTREACHED("Unexpected call to InsertCookieDBListener::HandleResult");
@@ -401,17 +399,17 @@ NS_IMPL_ISUPPORTS(InsertCookieDBListener
  * UpdateCookieDBListener impl:
  * mozIStorageStatementCallback used to track asynchronous update operations.
  ******************************************************************************/
 class UpdateCookieDBListener final : public DBListenerErrorHandler
 {
 private:
   virtual const char *GetOpType() override { return "UPDATE"; }
 
-  ~UpdateCookieDBListener() {}
+  ~UpdateCookieDBListener() = default;
 
 public:
   NS_DECL_ISUPPORTS
 
   explicit UpdateCookieDBListener(DBState* dbState) : DBListenerErrorHandler(dbState) { }
   NS_IMETHOD HandleResult(mozIStorageResultSet*) override
   {
     NS_NOTREACHED("Unexpected call to UpdateCookieDBListener::HandleResult");
@@ -429,17 +427,17 @@ NS_IMPL_ISUPPORTS(UpdateCookieDBListener
  * RemoveCookieDBListener impl:
  * mozIStorageStatementCallback used to track asynchronous removal operations.
  ******************************************************************************/
 class RemoveCookieDBListener final : public DBListenerErrorHandler
 {
 private:
   virtual const char *GetOpType() override { return "REMOVE"; }
 
-  ~RemoveCookieDBListener() {}
+  ~RemoveCookieDBListener() = default;
 
 public:
   NS_DECL_ISUPPORTS
 
   explicit RemoveCookieDBListener(DBState* dbState) : DBListenerErrorHandler(dbState) { }
   NS_IMETHOD HandleResult(mozIStorageResultSet*) override
   {
     NS_NOTREACHED("Unexpected call to RemoveCookieDBListener::HandleResult");
@@ -458,17 +456,17 @@ NS_IMPL_ISUPPORTS(RemoveCookieDBListener
  * mozIStorageStatementCallback used to track asynchronous removal operations.
  ******************************************************************************/
 class ReadCookieDBListener final : public DBListenerErrorHandler
 {
 private:
   virtual const char *GetOpType() override { return "READ"; }
   bool mCanceled;
 
-  ~ReadCookieDBListener() {}
+  ~ReadCookieDBListener() = default;
 
 public:
   NS_DECL_ISUPPORTS
 
   explicit ReadCookieDBListener(DBState* dbState)
     : DBListenerErrorHandler(dbState)
     , mCanceled(false)
   {
@@ -541,17 +539,17 @@ NS_IMPL_ISUPPORTS(ReadCookieDBListener, 
 
 /******************************************************************************
  * CloseCookieDBListener imp:
  * Static mozIStorageCompletionCallback used to notify when the database is
  * successfully closed.
  ******************************************************************************/
 class CloseCookieDBListener final :  public mozIStorageCompletionCallback
 {
-  ~CloseCookieDBListener() {}
+  ~CloseCookieDBListener() = default;
 
 public:
   explicit CloseCookieDBListener(DBState* dbState) : mDBState(dbState) { }
   RefPtr<DBState> mDBState;
   NS_DECL_ISUPPORTS
 
   NS_IMETHOD Complete(nsresult, nsISupports*) override
   {
@@ -561,17 +559,17 @@ public:
 };
 
 NS_IMPL_ISUPPORTS(CloseCookieDBListener, mozIStorageCompletionCallback)
 
 namespace {
 
 class AppClearDataObserver final : public nsIObserver {
 
-  ~AppClearDataObserver() {}
+  ~AppClearDataObserver() = default;
 
 public:
   NS_DECL_ISUPPORTS
 
   // nsIObserver implementation.
   NS_IMETHOD
   Observe(nsISupports *aSubject, const char *aTopic, const char16_t *aData) override
   {
@@ -807,17 +805,17 @@ nsCookieService::InitDBStates()
     CleanupDefaultDBConnection();
   }
 }
 
 namespace {
 
 class ConvertAppIdToOriginAttrsSQLFunction final : public mozIStorageFunction
 {
-  ~ConvertAppIdToOriginAttrsSQLFunction() {}
+  ~ConvertAppIdToOriginAttrsSQLFunction() = default;
 
   NS_DECL_ISUPPORTS
   NS_DECL_MOZISTORAGEFUNCTION
 };
 
 NS_IMPL_ISUPPORTS(ConvertAppIdToOriginAttrsSQLFunction, mozIStorageFunction);
 
 NS_IMETHODIMP
@@ -843,17 +841,17 @@ ConvertAppIdToOriginAttrsSQLFunction::On
   NS_ENSURE_SUCCESS(rv, rv);
 
   outVar.forget(aResult);
   return NS_OK;
 }
 
 class SetAppIdFromOriginAttributesSQLFunction final : public mozIStorageFunction
 {
-  ~SetAppIdFromOriginAttributesSQLFunction() {}
+  ~SetAppIdFromOriginAttributesSQLFunction() = default;
 
   NS_DECL_ISUPPORTS
   NS_DECL_MOZISTORAGEFUNCTION
 };
 
 NS_IMPL_ISUPPORTS(SetAppIdFromOriginAttributesSQLFunction, mozIStorageFunction);
 
 NS_IMETHODIMP
@@ -875,17 +873,17 @@ SetAppIdFromOriginAttributesSQLFunction:
 
   outVar.forget(aResult);
   return NS_OK;
 }
 
 class SetInBrowserFromOriginAttributesSQLFunction final :
   public mozIStorageFunction
 {
-  ~SetInBrowserFromOriginAttributesSQLFunction() {}
+  ~SetInBrowserFromOriginAttributesSQLFunction() = default;
 
   NS_DECL_ISUPPORTS
   NS_DECL_MOZISTORAGEFUNCTION
 };
 
 NS_IMPL_ISUPPORTS(SetInBrowserFromOriginAttributesSQLFunction,
                   mozIStorageFunction);
 
--- a/netwerk/dns/DNS.cpp
+++ b/netwerk/dns/DNS.cpp
@@ -273,19 +273,17 @@ NetAddrElement::NetAddrElement(const PRN
   PRNetAddrToNetAddr(prNetAddr, &mAddress);
 }
 
 NetAddrElement::NetAddrElement(const NetAddrElement& netAddr)
 {
   mAddress = netAddr.mAddress;
 }
 
-NetAddrElement::~NetAddrElement()
-{
-}
+NetAddrElement::~NetAddrElement() = default;
 
 AddrInfo::AddrInfo(const char *host, const PRAddrInfo *prAddrInfo,
                    bool disableIPv4, bool filterNameCollision, const char *cname)
   : mHostName(nullptr)
   , mCanonicalName(nullptr)
   , ttl(NO_TTL_DATA)
 {
   MOZ_ASSERT(prAddrInfo, "Cannot construct AddrInfo with a null prAddrInfo pointer!");
--- a/netwerk/dns/nsDNSService2.cpp
+++ b/netwerk/dns/nsDNSService2.cpp
@@ -63,17 +63,17 @@ public:
 
     explicit nsDNSRecord(nsHostRecord *hostRecord)
         : mHostRecord(hostRecord)
         , mIter(nullptr)
         , mIterGenCnt(-1)
         , mDone(false) {}
 
 private:
-    virtual ~nsDNSRecord() {}
+    virtual ~nsDNSRecord() = default;
 
     RefPtr<nsHostRecord>  mHostRecord;
     NetAddrElement         *mIter;
     int                     mIterGenCnt; // the generation count of
                                          // mHostRecord->addr_info when we
                                          // start iterating
     bool                    mDone;
 };
@@ -289,17 +289,17 @@ nsDNSRecord::ReportUnusable(uint16_t aPo
     return NS_OK;
 }
 
 //-----------------------------------------------------------------------------
 
 class nsDNSAsyncRequest final : public nsResolveHostCallback
                               , public nsICancelable
 {
-    ~nsDNSAsyncRequest() {}
+    ~nsDNSAsyncRequest() = default;
 
 public:
     NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSICANCELABLE
 
     nsDNSAsyncRequest(nsHostResolver   *res,
                       const nsACString &host,
                       nsIDNSListener   *listener,
@@ -391,17 +391,17 @@ nsDNSAsyncRequest::Cancel(nsresult reaso
 
 class nsDNSSyncRequest : public nsResolveHostCallback
 {
 public:
     explicit nsDNSSyncRequest(PRMonitor *mon)
         : mDone(false)
         , mStatus(NS_OK)
         , mMonitor(mon) {}
-    virtual ~nsDNSSyncRequest() {}
+    virtual ~nsDNSSyncRequest() = default;
 
     void OnLookupComplete(nsHostResolver *, nsHostRecord *, nsresult);
     bool EqualsAsyncListener(nsIDNSListener *aListener);
     size_t SizeOfIncludingThis(mozilla::MallocSizeOf) const;
 
     bool                   mDone;
     nsresult               mStatus;
     RefPtr<nsHostRecord> mHostRecord;
@@ -477,19 +477,17 @@ nsDNSService::nsDNSService()
     , mDisableIPv6(false)
     , mDisablePrefetch(false)
     , mFirstTime(true)
     , mNotifyResolution(false)
     , mOfflineLocalhost(false)
 {
 }
 
-nsDNSService::~nsDNSService()
-{
-}
+nsDNSService::~nsDNSService() = default;
 
 NS_IMPL_ISUPPORTS(nsDNSService, nsIDNSService, nsPIDNSService, nsIObserver,
                   nsIMemoryReporter)
 
 /******************************************************************************
  * nsDNSService impl:
  * singleton instance ctor/dtor methods
  ******************************************************************************/
--- a/netwerk/dns/nsHostResolver.cpp
+++ b/netwerk/dns/nsHostResolver.cpp
@@ -537,19 +537,17 @@ nsHostResolver::nsHostResolver(uint32_t 
     PR_INIT_CLIST(&mMediumQ);
     PR_INIT_CLIST(&mLowQ);
     PR_INIT_CLIST(&mEvictionQ);
 
     mLongIdleTimeout  = PR_SecondsToInterval(LongIdleTimeoutSeconds);
     mShortIdleTimeout = PR_SecondsToInterval(ShortIdleTimeoutSeconds);
 }
 
-nsHostResolver::~nsHostResolver()
-{
-}
+nsHostResolver::~nsHostResolver() = default;
 
 nsresult
 nsHostResolver::Init()
 {
     if (NS_FAILED(GetAddrInfoInit())) {
         return NS_ERROR_FAILURE;
     }
 
--- a/netwerk/mime/nsMIMEHeaderParamImpl.cpp
+++ b/netwerk/mime/nsMIMEHeaderParamImpl.cpp
@@ -187,17 +187,17 @@ class Continuation {
     }
     Continuation() {
       // empty constructor needed for nsTArray
       value = 0L;
       length = 0;
       needsPercentDecoding = false;
       wasQuotedString = false;
     }
-    ~Continuation() {}
+    ~Continuation() = default;
 
     const char *value;
     uint32_t length;
     bool needsPercentDecoding;
     bool wasQuotedString;
 };
 
 // combine segments into a single string, returning the allocated string
--- a/netwerk/protocol/http/ASpdySession.cpp
+++ b/netwerk/protocol/http/ASpdySession.cpp
@@ -23,19 +23,17 @@
 
 namespace mozilla {
 namespace net {
 
 ASpdySession::ASpdySession()
 {
 }
 
-ASpdySession::~ASpdySession()
-{
-}
+ASpdySession::~ASpdySession() = default;
 
 ASpdySession *
 ASpdySession::NewSpdySession(uint32_t version,
                              nsISocketTransport *aTransport)
 {
   // This is a necko only interface, so we can enforce version
   // requests as a precondition
   MOZ_ASSERT(version == HTTP_VERSION_2,
--- a/netwerk/sctp/datachannel/DataChannel.cpp
+++ b/netwerk/sctp/datachannel/DataChannel.cpp
@@ -93,17 +93,17 @@ public:
                                                  false);
       MOZ_ASSERT(rv == NS_OK);
       (void) rv;
     }
 
 private:
   // The only instance of DataChannelShutdown is owned by the observer
   // service, so there is no need to call RemoveObserver here.
-  virtual ~DataChannelShutdown() {}
+  virtual ~DataChannelShutdown() = default;
 
 public:
   NS_IMETHOD Observe(nsISupports* aSubject, const char* aTopic,
                      const char16_t* aData) override {
     if (strcmp(aTopic, "xpcom-will-shutdown") == 0) {
       LOG(("Shutting down SCTP"));
       if (sctp_initialized) {
         usrsctp_finish();
--- a/netwerk/streamconv/nsStreamConverterService.cpp
+++ b/netwerk/streamconv/nsStreamConverterService.cpp
@@ -62,18 +62,17 @@ NS_IMPL_ISUPPORTS(nsStreamConverterServi
 // nsIStreamConverterService methods
 
 ////////////////////////////////////////////////////////////
 // nsStreamConverterService methods
 nsStreamConverterService::nsStreamConverterService()
 {
 }
 
-nsStreamConverterService::~nsStreamConverterService() {
-}
+nsStreamConverterService::~nsStreamConverterService() = default;
 
 // Builds the graph represented as an adjacency list (and built up in
 // memory using an nsObjectHashtable and nsCOMArray combination).
 //
 // :BuildGraph() consults the category manager for all stream converter
 // CONTRACTIDS then fills the adjacency list with edges.
 // An edge in this case is comprised of a FROM and TO MIME type combination.
 //
--- a/netwerk/system/mac/nsNetworkLinkService.mm
+++ b/netwerk/system/mac/nsNetworkLinkService.mm
@@ -79,19 +79,17 @@ nsNetworkLinkService::nsNetworkLinkServi
     , mAllowChangedEvent(true)
     , mReachability(nullptr)
     , mCFRunLoop(nullptr)
     , mRunLoopSource(nullptr)
     , mStoreRef(nullptr)
 {
 }
 
-nsNetworkLinkService::~nsNetworkLinkService()
-{
-}
+nsNetworkLinkService::~nsNetworkLinkService() = default;
 
 NS_IMETHODIMP
 nsNetworkLinkService::GetIsLinkUp(bool *aIsUp)
 {
     *aIsUp = mLinkUp;
     return NS_OK;
 }
 
--- a/netwerk/test/TestBind.cpp
+++ b/netwerk/test/TestBind.cpp
@@ -33,19 +33,17 @@ private:
 NS_IMPL_ISUPPORTS(ServerListener, nsIServerSocketListener)
 
 ServerListener::ServerListener()
   : mClientPort(-1)
   , mFailed(false)
 {
 }
 
-ServerListener::~ServerListener()
-{
-}
+ServerListener::~ServerListener() = default;
 
 NS_IMETHODIMP
 ServerListener::OnSocketAccepted(nsIServerSocket *aServ,
                                  nsISocketTransport *aTransport)
 {
   // Run on STS thread.
   NetAddr peerAddr;
   nsresult rv = aTransport->GetPeerAddr(&peerAddr);
@@ -83,19 +81,17 @@ private:
 
 NS_IMPL_ISUPPORTS(ClientInputCallback, nsIInputStreamCallback)
 
 ClientInputCallback::ClientInputCallback()
   : mFailed(false)
 {
 }
 
-ClientInputCallback::~ClientInputCallback()
-{
-}
+ClientInputCallback::~ClientInputCallback() = default;
 
 NS_IMETHODIMP
 ClientInputCallback::OnInputStreamReady(nsIAsyncInputStream *aStream)
 {
   // Server doesn't send. That means if we are here, we probably have run into
   // an error.
   uint64_t avail;
   nsresult rv = aStream->Available(&avail);
--- a/netwerk/test/TestDNS.cpp
+++ b/netwerk/test/TestDNS.cpp
@@ -47,17 +47,17 @@ public:
                 printf("%d: => %s\n", mIndex, buf.get());
             }
         }
 
         return NS_OK;
     }
 
 private:
-    virtual ~myDNSListener() {}
+    virtual ~myDNSListener() = default;
 
     nsCString mHost;
     int32_t   mIndex;
 };
 
 
 NS_IMPL_ISUPPORTS(myDNSListener, nsIDNSListener)
 
--- a/netwerk/test/TestIncrementalDownload.cpp
+++ b/netwerk/test/TestIncrementalDownload.cpp
@@ -18,17 +18,17 @@
 #include "prenv.h"
 #include "mozilla/Attributes.h"
 
 //-----------------------------------------------------------------------------
 
 class FetchObserver final : public nsIRequestObserver
                           , public nsIProgressEventSink
 {
-  ~FetchObserver() {}
+  ~FetchObserver() = default;
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIREQUESTOBSERVER
   NS_DECL_NSIPROGRESSEVENTSINK
 };
 
 NS_IMPL_ISUPPORTS(FetchObserver, nsIRequestObserver,
                   nsIProgressEventSink)
--- a/netwerk/test/TestProtocols.cpp
+++ b/netwerk/test/TestProtocols.cpp
@@ -159,17 +159,17 @@ void PrintTimingInformation(nsITimedChan
 }
 
 //-----------------------------------------------------------------------------
 // HeaderVisitor
 //-----------------------------------------------------------------------------
 
 class HeaderVisitor : public nsIHttpHeaderVisitor
 {
-  virtual ~HeaderVisitor() {}
+  virtual ~HeaderVisitor() = default;
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIHTTPHEADERVISITOR
 
   HeaderVisitor() { }
 };
 NS_IMPL_ISUPPORTS(HeaderVisitor, nsIHttpHeaderVisitor)
 
@@ -205,19 +205,17 @@ public:
 };
 
 URLLoadInfo::URLLoadInfo(const char *aUrl) : mURLString(aUrl)
 {
   mBytesRead = 0;
   mConnectTime = mTotalTime = PR_Now();
 }
 
-URLLoadInfo::~URLLoadInfo()
-{
-}
+URLLoadInfo::~URLLoadInfo() = default;
 
 
 NS_IMPL_ISUPPORTS0(URLLoadInfo)
 
 //-----------------------------------------------------------------------------
 // TestChannelEventSink
 //-----------------------------------------------------------------------------
 
@@ -231,19 +229,17 @@ public:
 
   TestChannelEventSink();
 };
 
 TestChannelEventSink::TestChannelEventSink()
 {
 }
 
-TestChannelEventSink::~TestChannelEventSink()
-{
-}
+TestChannelEventSink::~TestChannelEventSink() = default;
 
 
 NS_IMPL_ISUPPORTS(TestChannelEventSink, nsIChannelEventSink)
 
 NS_IMETHODIMP
 TestChannelEventSink::AsyncOnChannelRedirect(nsIChannel *channel,
                                              nsIChannel *newChannel,
                                              uint32_t flags,
@@ -271,19 +267,17 @@ public:
 };
 
 NS_IMPL_ISUPPORTS(TestAuthPrompt, nsIAuthPrompt)
 
 TestAuthPrompt::TestAuthPrompt()
 {
 }
 
-TestAuthPrompt::~TestAuthPrompt()
-{
-}
+TestAuthPrompt::~TestAuthPrompt() = default;
 
 NS_IMETHODIMP
 TestAuthPrompt::Prompt(const char16_t *dialogTitle,
                        const char16_t *text,
                        const char16_t *passwordRealm,
                        uint32_t savePassword,
                        const char16_t *defaultText,
                        char16_t **result,
@@ -562,17 +556,17 @@ InputTestConsumer::OnStopRequest(nsIRequ
 }
 
 //-----------------------------------------------------------------------------
 // NotificationCallbacks
 //-----------------------------------------------------------------------------
 
 class NotificationCallbacks final : public nsIInterfaceRequestor {
 
-    ~NotificationCallbacks() {}
+    ~NotificationCallbacks() = default;
 
 public:
     NS_DECL_ISUPPORTS
 
     NotificationCallbacks() {
     }
 
     NS_IMETHOD GetInterface(const nsIID& iid, void* *result) override {
--- a/netwerk/test/TestServ.cpp
+++ b/netwerk/test/TestServ.cpp
@@ -20,17 +20,17 @@
 // set NSPR_LOG_MODULES=Test:5
 //
 static PRLogModuleInfo *gTestLog = nullptr;
 #define LOG(args) MOZ_LOG(gTestLog, mozilla::LogLevel::Debug, args)
 
 class MySocketListener : public nsIServerSocketListener
 {
 protected:
-    virtual ~MySocketListener() {}
+    virtual ~MySocketListener() = default;
 
 public:
     NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSISERVERSOCKETLISTENER
 
     MySocketListener() {}
 };
 
--- a/netwerk/test/TestStreamLoader.cpp
+++ b/netwerk/test/TestStreamLoader.cpp
@@ -10,17 +10,17 @@
 //
 // set NSPR_LOG_MODULES=Test:5
 //
 static PRLogModuleInfo *gTestLog = nullptr;
 #define LOG(args) MOZ_LOG(gTestLog, mozilla::LogLevel::Debug, args)
 
 class MyStreamLoaderObserver final : public nsIStreamLoaderObserver
 {
-  ~MyStreamLoaderObserver() {}
+  ~MyStreamLoaderObserver() = default;
 
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSISTREAMLOADEROBSERVER
 };
 
 NS_IMPL_ISUPPORTS(MyStreamLoaderObserver, nsIStreamLoaderObserver)
 
--- a/netwerk/test/TestUDPSocket.cpp
+++ b/netwerk/test/TestUDPSocket.cpp
@@ -105,19 +105,17 @@ protected:
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIUDPSOCKETLISTENER
   nsresult mResult;
 };
 
 NS_IMPL_ISUPPORTS(UDPClientListener, nsIUDPSocketListener)
 
-UDPClientListener::~UDPClientListener()
-{
-}
+UDPClientListener::~UDPClientListener() = default;
 
 NS_IMETHODIMP
 UDPClientListener::OnPacketReceived(nsIUDPSocket* socket, nsIUDPMessage* message)
 {
   mResult = NS_OK;
 
   uint16_t port;
   nsCString ip;
@@ -167,19 +165,17 @@ public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIUDPSOCKETLISTENER
 
   nsresult mResult;
 };
 
 NS_IMPL_ISUPPORTS(UDPServerListener, nsIUDPSocketListener)
 
-UDPServerListener::~UDPServerListener()
-{
-}
+UDPServerListener::~UDPServerListener() = default;
 
 NS_IMETHODIMP
 UDPServerListener::OnPacketReceived(nsIUDPSocket* socket, nsIUDPMessage* message)
 {
   mResult = NS_OK;
 
   uint16_t port;
   nsCString ip;
@@ -235,19 +231,17 @@ public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSITIMERCALLBACK
 
   nsresult mResult;
 };
 
 NS_IMPL_ISUPPORTS(MulticastTimerCallback, nsITimerCallback)
 
-MulticastTimerCallback::~MulticastTimerCallback()
-{
-}
+MulticastTimerCallback::~MulticastTimerCallback() = default;
 
 NS_IMETHODIMP
 MulticastTimerCallback::Notify(nsITimer* timer)
 {
   if (TEST_MULTICAST != phase) {
     return NS_OK;
   }
   // Multicast ping failed
--- a/netwerk/test/TestUpload.cpp
+++ b/netwerk/test/TestUpload.cpp
@@ -40,19 +40,17 @@ public:
   NS_DECL_NSIREQUESTOBSERVER
   NS_DECL_NSISTREAMLISTENER
 };
 
 InputTestConsumer::InputTestConsumer()
 {
 }
 
-InputTestConsumer::~InputTestConsumer()
-{
-}
+InputTestConsumer::~InputTestConsumer() = default;
 
 NS_IMPL_ISUPPORTS(InputTestConsumer,
                   nsIStreamListener,
                   nsIRequestObserver)
 
 NS_IMETHODIMP
 InputTestConsumer::OnStartRequest(nsIRequest *request, nsISupports* context)
 {