Bug 1318004 - Replace default bodies of special member functions with = default; draft
authorSylvestre Ledru <sledru@mozilla.com>
Wed, 16 Nov 2016 16:45:07 +0100
changeset 439775 e1b728166ed9643f8e7a14f0133cb5fc4915aba6
parent 439774 3ef2599b33dfbdd0e1a3a6f690986a0be9d50299
child 439776 88ebdb64e8291b1147f651c1f547ad539e35f029
push id36087
push usersledru@mozilla.com
push dateWed, 16 Nov 2016 15:54:11 +0000
bugs1318004
milestone53.0a1
Bug 1318004 - Replace default bodies of special member functions with = default; MozReview-Commit-ID: Hnt2AdWcj56
toolkit/components/commandlines/nsCommandLine.cpp
toolkit/components/ctypes/ctypes.cpp
toolkit/components/filepicker/nsFileView.cpp
toolkit/components/find/nsFindService.cpp
toolkit/components/mozintl/MozIntl.cpp
toolkit/components/parentalcontrols/nsParentalControlsServiceDefault.cpp
toolkit/components/perf/PerfMeasurement.cpp
toolkit/components/places/tests/cpp/test_IHistory.cpp
toolkit/components/protobuf/src/google/protobuf/extension_set_heavy.cc
toolkit/components/protobuf/src/google/protobuf/text_format.cc
toolkit/components/reflect/reflect.cpp
toolkit/components/remote/nsXRemoteService.cpp
toolkit/components/telemetry/Telemetry.cpp
toolkit/components/telemetry/TelemetryScalar.cpp
toolkit/components/terminator/nsTerminator.cpp
toolkit/components/url-classifier/HashStore.cpp
toolkit/identity/IdentityCryptoService.cpp
toolkit/mozapps/update/updater/updater.cpp
toolkit/system/gnome/nsGIOService.cpp
toolkit/system/gnome/nsSystemAlertsService.cpp
toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
toolkit/xre/nsAppRunner.cpp
--- a/toolkit/components/commandlines/nsCommandLine.cpp
+++ b/toolkit/components/commandlines/nsCommandLine.cpp
@@ -50,17 +50,17 @@ class nsCommandLine final : public nsICo
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSICOMMANDLINE
   NS_DECL_NSICOMMANDLINERUNNER
 
   nsCommandLine();
 
 protected:
-  ~nsCommandLine() { }
+  ~nsCommandLine() = default;
 
   typedef nsresult (*EnumerateHandlersCallback)(nsICommandLineHandler* aHandler,
 					nsICommandLine* aThis,
 					void *aClosure);
   typedef nsresult (*EnumerateValidatorsCallback)(nsICommandLineValidator* aValidator,
 					nsICommandLine* aThis,
 					void *aClosure);
 
--- a/toolkit/components/ctypes/ctypes.cpp
+++ b/toolkit/components/ctypes/ctypes.cpp
@@ -45,23 +45,19 @@ UnicodeToNative(JSContext *cx, const cha
 static JSCTypesCallbacks sCallbacks = {
   UnicodeToNative
 };
 
 NS_GENERIC_FACTORY_CONSTRUCTOR(Module)
 
 NS_IMPL_ISUPPORTS(Module, nsIXPCScriptable)
 
-Module::Module()
-{
-}
+Module::Module() = default;
 
-Module::~Module()
-{
-}
+Module::~Module() = default;
 
 #define XPC_MAP_CLASSNAME Module
 #define XPC_MAP_QUOTED_CLASSNAME "Module"
 #define XPC_MAP_WANT_CALL
 #define XPC_MAP_FLAGS nsIXPCScriptable::WANT_CALL
 #include "xpc_map_end.h"
 
 static bool
--- a/toolkit/components/filepicker/nsFileView.cpp
+++ b/toolkit/components/filepicker/nsFileView.cpp
@@ -42,17 +42,17 @@ public:
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIAUTOCOMPLETERESULT
 
   nsTArray<nsString> mValues;
   nsString mSearchString;
   uint16_t mSearchResult;
 private:
-  ~nsFileResult() {}
+  ~nsFileResult() = default;
 };
 
 NS_IMPL_ISUPPORTS(nsFileResult, nsIAutoCompleteResult)
 
 nsFileResult::nsFileResult(const nsAString& aSearchString,
                            const nsAString& aSearchParam):
   mSearchString(aSearchString)
 {
@@ -174,17 +174,17 @@ NS_IMETHODIMP nsFileResult::GetFinalComp
 
 NS_IMETHODIMP nsFileResult::RemoveValueAt(int32_t rowIndex, bool removeFromDb)
 {
   return NS_OK;
 }
 
 class nsFileComplete final : public nsIAutoCompleteSearch
 {
-  ~nsFileComplete() {}
+  ~nsFileComplete() = default;
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIAUTOCOMPLETESEARCH
 };
 
 NS_IMPL_ISUPPORTS(nsFileComplete, nsIAutoCompleteSearch)
 
 NS_IMETHODIMP
--- a/toolkit/components/find/nsFindService.cpp
+++ b/toolkit/components/find/nsFindService.cpp
@@ -17,19 +17,17 @@ nsFindService::nsFindService()
 : mFindBackwards(false)
 , mWrapFind(true)
 , mEntireWord(false)
 , mMatchCase(false)
 {
 }
 
 
-nsFindService::~nsFindService()
-{
-}
+nsFindService::~nsFindService() = default;
 
 NS_IMPL_ISUPPORTS(nsFindService, nsIFindService)
 
 NS_IMETHODIMP nsFindService::GetSearchString(nsAString & aSearchString)
 {
     aSearchString = mSearchString;
     return NS_OK;
 }
--- a/toolkit/components/mozintl/MozIntl.cpp
+++ b/toolkit/components/mozintl/MozIntl.cpp
@@ -9,23 +9,19 @@
 
 #define MOZ_MOZINTL_CID \
   { 0x83f8f991, 0x6b81, 0x4dd8, { 0xa0, 0x93, 0x72, 0x0b, 0xfb, 0x67, 0x4d, 0x38 } }
 
 using namespace mozilla;
 
 NS_IMPL_ISUPPORTS(MozIntl, mozIMozIntl)
 
-MozIntl::MozIntl()
-{
-}
+MozIntl::MozIntl() = default;
 
-MozIntl::~MozIntl()
-{
-}
+MozIntl::~MozIntl() = default;
 
 NS_IMETHODIMP
 MozIntl::AddGetCalendarInfo(JS::Handle<JS::Value> val, JSContext* cx)
 {
   if (!val.isObject()) {
     return NS_ERROR_INVALID_ARG;
   }
 
--- a/toolkit/components/parentalcontrols/nsParentalControlsServiceDefault.cpp
+++ b/toolkit/components/parentalcontrols/nsParentalControlsServiceDefault.cpp
@@ -12,18 +12,17 @@ NS_IMPL_ISUPPORTS(nsParentalControlsServ
 
 nsParentalControlsService::nsParentalControlsService() :
   mEnabled(false)
 {
   mozilla::Unused << mEnabled;
 }
 
 nsParentalControlsService::~nsParentalControlsService()
-{
-}
+= default;
 
 NS_IMETHODIMP
 nsParentalControlsService::GetParentalControlsEnabled(bool *aResult)
 {
   *aResult = false;
   return NS_OK;
 }
 
--- a/toolkit/components/perf/PerfMeasurement.cpp
+++ b/toolkit/components/perf/PerfMeasurement.cpp
@@ -20,23 +20,19 @@
 
 namespace mozilla {
 namespace jsperf {
 
 NS_GENERIC_FACTORY_CONSTRUCTOR(Module)
 
 NS_IMPL_ISUPPORTS(Module, nsIXPCScriptable)
 
-Module::Module()
-{
-}
+Module::Module() = default;
 
-Module::~Module()
-{
-}
+Module::~Module() = default;
 
 #define XPC_MAP_CLASSNAME Module
 #define XPC_MAP_QUOTED_CLASSNAME "Module"
 #define XPC_MAP_WANT_CALL
 #define XPC_MAP_FLAGS nsIXPCScriptable::WANT_CALL
 #include "xpc_map_end.h"
 
 static bool
--- a/toolkit/components/places/tests/cpp/test_IHistory.cpp
+++ b/toolkit/components/places/tests/cpp/test_IHistory.cpp
@@ -45,17 +45,17 @@ new_test_uri()
   nsCOMPtr<nsIURI> testURI;
   nsresult rv = NS_NewURI(getter_AddRefs(testURI), spec);
   do_check_success(rv);
   return testURI.forget();
 }
 
 class VisitURIObserver final : public nsIObserver
 {
-  ~VisitURIObserver() {}
+  ~VisitURIObserver() = default;
 
 public:
   NS_DECL_ISUPPORTS
 
   explicit VisitURIObserver(int aExpectedVisits = 1) :
     mVisits(0),
     mExpectedVisits(aExpectedVisits)
   {
@@ -303,17 +303,17 @@ test_RegisterVisitedCallback_returns_bef
 }
 
 namespace test_observer_topic_dispatched_helpers {
   #define URI_VISITED "visited"
   #define URI_NOT_VISITED "not visited"
   #define URI_VISITED_RESOLUTION_TOPIC "visited-status-resolution"
   class statusObserver final : public nsIObserver
   {
-    ~statusObserver() {}
+    ~statusObserver() = default;
 
   public:
     NS_DECL_ISUPPORTS
 
     statusObserver(nsIURI* aURI,
                    const bool aExpectVisit,
                    bool& _notified)
     : mURI(aURI)
--- a/toolkit/components/protobuf/src/google/protobuf/extension_set_heavy.cc
+++ b/toolkit/components/protobuf/src/google/protobuf/extension_set_heavy.cc
@@ -49,17 +49,17 @@ namespace protobuf {
 namespace internal {
 
 // A FieldSkipper used to store unknown MessageSet fields into UnknownFieldSet.
 class MessageSetFieldSkipper
     : public UnknownFieldSetFieldSkipper {
  public:
   explicit MessageSetFieldSkipper(UnknownFieldSet* unknown_fields)
       : UnknownFieldSetFieldSkipper(unknown_fields) {}
-  virtual ~MessageSetFieldSkipper() {}
+  virtual ~MessageSetFieldSkipper() = default;
 
   virtual bool SkipMessageSetField(io::CodedInputStream* input,
                                    int field_number);
 };
 bool MessageSetFieldSkipper::SkipMessageSetField(
     io::CodedInputStream* input, int field_number) {
   uint32 length;
   if (!input->ReadVarint32(&length)) return false;
@@ -76,17 +76,17 @@ bool MessageSetFieldSkipper::SkipMessage
 // DescriptorPool, using the given MessageFactory to construct sub-objects.
 // This class is implemented in extension_set_heavy.cc.
 class DescriptorPoolExtensionFinder : public ExtensionFinder {
  public:
   DescriptorPoolExtensionFinder(const DescriptorPool* pool,
                                 MessageFactory* factory,
                                 const Descriptor* containing_type)
       : pool_(pool), factory_(factory), containing_type_(containing_type) {}
-  virtual ~DescriptorPoolExtensionFinder() {}
+  virtual ~DescriptorPoolExtensionFinder() = default;
 
   virtual bool Find(int number, ExtensionInfo* output);
 
  private:
   const DescriptorPool* pool_;
   MessageFactory* factory_;
   const Descriptor* containing_type_;
 };
--- a/toolkit/components/protobuf/src/google/protobuf/text_format.cc
+++ b/toolkit/components/protobuf/src/google/protobuf/text_format.cc
@@ -108,17 +108,17 @@ string Message::Utf8DebugString() const 
 
 void Message::PrintDebugString() const {
   printf("%s", DebugString().c_str());
 }
 
 
 // ===========================================================================
 // Implementation of the parse information tree class.
-TextFormat::ParseInfoTree::ParseInfoTree() { }
+TextFormat::ParseInfoTree::ParseInfoTree() = default;
 
 TextFormat::ParseInfoTree::~ParseInfoTree() {
   // Remove any nested information trees, as they are owned by this tree.
   for (auto & it : nested_) {
     STLDeleteElements(&(it.second));
   }
 }
 
@@ -235,17 +235,17 @@ class TextFormat::Parser::ParserImpl {
     if (allow_relaxed_whitespace) {
       tokenizer_.set_require_space_after_number(false);
       tokenizer_.set_allow_multiline_strings(true);
     }
 
     // Consume the starting token.
     tokenizer_.Next();
   }
-  ~ParserImpl() { }
+  ~ParserImpl() = default;
 
   // Parses the ASCII representation specified in input and saves the
   // information into the output pointer (a Message). Returns
   // false if an error occurs (an error will also be logged to
   // GOOGLE_LOG(ERROR)).
   bool Parse(Message* output) {
     // Consume fields until we cannot do so anymore.
     while (true) {
@@ -976,17 +976,17 @@ class TextFormat::Parser::ParserImpl {
 
   // An internal instance of the Tokenizer's error collector, used to
   // collect any base-level parse errors and feed them to the ParserImpl.
   class ParserErrorCollector : public io::ErrorCollector {
    public:
     explicit ParserErrorCollector(TextFormat::Parser::ParserImpl* parser) :
         parser_(parser) { }
 
-    virtual ~ParserErrorCollector() { }
+    virtual ~ParserErrorCollector() = default;
 
     virtual void AddError(int line, int column, const string& message) {
       parser_->ReportError(line, column, message);
     }
 
     virtual void AddWarning(int line, int column, const string& message) {
       parser_->ReportWarning(line, column, message);
     }
@@ -1131,33 +1131,32 @@ class TextFormat::Printer::TextGenerator
   bool failed_;
 
   string indent_;
   int initial_indent_level_;
 };
 
 // ===========================================================================
 
-TextFormat::Finder::~Finder() {
-}
+TextFormat::Finder::~Finder() = default;
 
 TextFormat::Parser::Parser()
   : error_collector_(NULL),
     finder_(NULL),
     parse_info_tree_(NULL),
     allow_partial_(false),
     allow_case_insensitive_field_(false),
     allow_unknown_field_(false),
     allow_unknown_enum_(false),
     allow_field_number_(false),
     allow_relaxed_whitespace_(false),
     allow_singular_overwrites_(false) {
 }
 
-TextFormat::Parser::~Parser() {}
+TextFormat::Parser::~Parser() = default;
 
 bool TextFormat::Parser::Parse(io::ZeroCopyInputStream* input,
                                Message* output) {
   output->Clear();
 
   ParserImpl::SingularOverwritePolicy overwrites_policy =
       allow_singular_overwrites_
       ? ParserImpl::ALLOW_SINGULAR_OVERWRITES
@@ -1243,18 +1242,18 @@ bool TextFormat::Parser::ParseFieldValue
   return Parser().MergeFromString(input, output);
 }
 
 // ===========================================================================
 
 // The default implementation for FieldValuePrinter. The base class just
 // does simple formatting. That way, deriving classes could decide to fallback
 // to that behavior.
-TextFormat::FieldValuePrinter::FieldValuePrinter() {}
-TextFormat::FieldValuePrinter::~FieldValuePrinter() {}
+TextFormat::FieldValuePrinter::FieldValuePrinter() = default;
+TextFormat::FieldValuePrinter::~FieldValuePrinter() = default;
 string TextFormat::FieldValuePrinter::PrintBool(bool val) const {
   return val ? "true" : "false";
 }
 string TextFormat::FieldValuePrinter::PrintInt32(int32 val) const {
   return SimpleItoa(val);
 }
 string TextFormat::FieldValuePrinter::PrintUInt32(uint32 val) const {
   return SimpleItoa(val);
--- a/toolkit/components/reflect/reflect.cpp
+++ b/toolkit/components/reflect/reflect.cpp
@@ -18,23 +18,19 @@
 
 namespace mozilla {
 namespace reflect {
 
 NS_GENERIC_FACTORY_CONSTRUCTOR(Module)
 
 NS_IMPL_ISUPPORTS(Module, nsIXPCScriptable)
 
-Module::Module()
-{
-}
+Module::Module() = default;
 
-Module::~Module()
-{
-}
+Module::~Module() = default;
 
 #define XPC_MAP_CLASSNAME Module
 #define XPC_MAP_QUOTED_CLASSNAME "Module"
 #define XPC_MAP_WANT_CALL
 #define XPC_MAP_FLAGS nsIXPCScriptable::WANT_CALL
 #include "xpc_map_end.h"
 
 NS_IMETHODIMP
--- a/toolkit/components/remote/nsXRemoteService.cpp
+++ b/toolkit/components/remote/nsXRemoteService.cpp
@@ -105,19 +105,17 @@ FindExtensionParameterInCommand(const ch
   } else {
     idEnd = charEnd;
   }
   *aValue = nsDependentCSubstring(idStart, idEnd);
   return true;
 }
 
 
-nsXRemoteService::nsXRemoteService()
-{    
-}
+nsXRemoteService::nsXRemoteService() = default;
 
 void
 nsXRemoteService::XRemoteBaseStartup(const char *aAppName, const char *aProfileName)
 {
     EnsureAtoms();
 
     mAppName = aAppName;
     ToLowerCase(mAppName);
--- a/toolkit/components/telemetry/Telemetry.cpp
+++ b/toolkit/components/telemetry/Telemetry.cpp
@@ -217,17 +217,17 @@ public:
       : mAnnotations(Move(aAnnotations))
     {
       mHangIndices.AppendElement(aHangIndex);
     }
     AnnotationInfo(AnnotationInfo&& aOther)
       : mHangIndices(aOther.mHangIndices)
       , mAnnotations(Move(aOther.mAnnotations))
     {}
-    ~AnnotationInfo() {}
+    ~AnnotationInfo() = default;
     AnnotationInfo& operator=(AnnotationInfo&& aOther)
     {
       mHangIndices = aOther.mHangIndices;
       mAnnotations = Move(aOther.mAnnotations);
       return *this;
     }
     // To save memory, a single AnnotationInfo can be associated to multiple chrome
     // hangs. The following array holds the index of each related chrome hang.
@@ -2534,19 +2534,17 @@ RecordShutdownEndTimeStamp() {
 ////////////////////////////////////////////////////////////////////////
 //
 // EXTERNALLY VISIBLE FUNCTIONS in mozilla::Telemetry::
 // These are NOT listed in Telemetry.h
 
 namespace mozilla {
 namespace Telemetry {
 
-ProcessedStack::ProcessedStack()
-{
-}
+ProcessedStack::ProcessedStack() = default;
 
 size_t ProcessedStack::GetStackSize() const
 {
   return mStack.size();
 }
 
 size_t ProcessedStack::GetNumModules() const
 {
--- a/toolkit/components/telemetry/TelemetryScalar.cpp
+++ b/toolkit/components/telemetry/TelemetryScalar.cpp
@@ -150,17 +150,17 @@ ScalarInfo::expiration() const
 
 /**
  * The base scalar object, that servers as a common ancestor for storage
  * purposes.
  */
 class ScalarBase
 {
 public:
-  virtual ~ScalarBase() {};
+  virtual ~ScalarBase() = default;;
 
   // Set, Add and SetMaximum functions as described in the Telemetry IDL.
   virtual ScalarResult SetValue(nsIVariant* aValue) = 0;
   virtual ScalarResult AddValue(nsIVariant* aValue) { return ScalarResult::OperationNotSupported; }
   virtual ScalarResult SetMaximum(nsIVariant* aValue) { return ScalarResult::OperationNotSupported; }
 
   // Convenience methods used by the C++ API.
   virtual void SetValue(uint32_t aValue) { mozilla::Unused << HandleUnsupported(); }
@@ -190,17 +190,17 @@ ScalarBase::HandleUnsupported() const
  * The implementation for the unsigned int scalar type.
  */
 class ScalarUnsigned : public ScalarBase
 {
 public:
   using ScalarBase::SetValue;
 
   ScalarUnsigned() : mStorage(0) {};
-  ~ScalarUnsigned() {};
+  ~ScalarUnsigned() = default;;
 
   ScalarResult SetValue(nsIVariant* aValue) final;
   void SetValue(uint32_t aValue) final;
   ScalarResult AddValue(nsIVariant* aValue) final;
   void AddValue(uint32_t aValue) final;
   ScalarResult SetMaximum(nsIVariant* aValue) final;
   void SetMaximum(uint32_t aValue) final;
   nsresult GetValue(nsCOMPtr<nsIVariant>& aResult) const final;
@@ -330,17 +330,17 @@ ScalarUnsigned::CheckInput(nsIVariant* a
  * The implementation for the string scalar type.
  */
 class ScalarString : public ScalarBase
 {
 public:
   using ScalarBase::SetValue;
 
   ScalarString() : mStorage(EmptyString()) {};
-  ~ScalarString() {};
+  ~ScalarString() = default;;
 
   ScalarResult SetValue(nsIVariant* aValue) final;
   ScalarResult SetValue(const nsAString& aValue) final;
   nsresult GetValue(nsCOMPtr<nsIVariant>& aResult) const final;
   size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const final;
 
 private:
   nsString mStorage;
@@ -411,17 +411,17 @@ ScalarString::SizeOfIncludingThis(mozill
  * The implementation for the boolean scalar type.
  */
 class ScalarBoolean : public ScalarBase
 {
 public:
   using ScalarBase::SetValue;
 
   ScalarBoolean() : mStorage(false) {};
-  ~ScalarBoolean() {};
+  ~ScalarBoolean() = default;;
 
   ScalarResult SetValue(nsIVariant* aValue) final;
   void SetValue(bool aValue) final;
   nsresult GetValue(nsCOMPtr<nsIVariant>& aResult) const final;
   size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const final;
 
 private:
   bool mStorage;
@@ -510,17 +510,17 @@ internal_ScalarAllocate(uint32_t aScalar
  * The implementation for the keyed scalar type.
  */
 class KeyedScalar
 {
 public:
   typedef mozilla::Pair<nsCString, nsCOMPtr<nsIVariant>> KeyValuePair;
 
   explicit KeyedScalar(uint32_t aScalarKind) : mScalarKind(aScalarKind) {};
-  ~KeyedScalar() {};
+  ~KeyedScalar() = default;;
 
   // Set, Add and SetMaximum functions as described in the Telemetry IDL.
   // These methods implicitly instantiate a Scalar[*] for each key.
   ScalarResult SetValue(const nsAString& aKey, nsIVariant* aValue);
   ScalarResult AddValue(const nsAString& aKey, nsIVariant* aValue);
   ScalarResult SetMaximum(const nsAString& aKey, nsIVariant* aValue);
 
   // Convenience methods used by the C++ API.
--- a/toolkit/components/terminator/nsTerminator.cpp
+++ b/toolkit/components/terminator/nsTerminator.cpp
@@ -168,20 +168,19 @@ RunWatchdog(void* arg)
 // thread rather than usual XPCOM I/O simply because we outlive XPCOM and its
 // threads.
 //
 
 // Utility class, used by UniquePtr<> to close nspr files.
 class PR_CloseDelete
 {
 public:
-  constexpr PR_CloseDelete() {}
+  constexpr PR_CloseDelete() = default;
 
-  PR_CloseDelete(const PR_CloseDelete& aOther)
-  {}
+  PR_CloseDelete(const PR_CloseDelete& aOther) = default;
 
   void operator()(PRFileDesc* aPtr) const
   {
     PR_Close(aPtr);
   }
 };
 
 //
--- a/toolkit/components/url-classifier/HashStore.cpp
+++ b/toolkit/components/url-classifier/HashStore.cpp
@@ -215,19 +215,17 @@ HashStore::HashStore(const nsACString& a
                                                      aTableName,
                                                      getter_AddRefs(mStoreDirectory));
   if (NS_FAILED(rv)) {
     LOG(("Failed to get private store directory for %s", mTableName.get()));
     mStoreDirectory = aRootStoreDir;
   }
 }
 
-HashStore::~HashStore()
-{
-}
+HashStore::~HashStore() = default;
 
 nsresult
 HashStore::Reset()
 {
   LOG(("HashStore resetting"));
 
   nsCOMPtr<nsIFile> storeFile;
   nsresult rv = mStoreDirectory->Clone(getter_AddRefs(storeFile));
--- a/toolkit/identity/IdentityCryptoService.cpp
+++ b/toolkit/identity/IdentityCryptoService.cpp
@@ -166,29 +166,29 @@ private:
 };
 
 class IdentityCryptoService final : public nsIIdentityCryptoService
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIIDENTITYCRYPTOSERVICE
 
-  IdentityCryptoService() { }
+  IdentityCryptoService() = default;
   nsresult Init()
   {
     nsresult rv;
     nsCOMPtr<nsISupports> dummyUsedToEnsureNSSIsInitialized
       = do_GetService("@mozilla.org/psm;1", &rv);
     NS_ENSURE_SUCCESS(rv, rv);
 
     return NS_OK;
   }
 
 private:
-  ~IdentityCryptoService() { }
+  ~IdentityCryptoService() = default;
   IdentityCryptoService(const KeyPair &) = delete;
   void operator=(const IdentityCryptoService &) = delete;
 };
 
 NS_IMPL_ISUPPORTS(IdentityCryptoService, nsIIdentityCryptoService)
 
 NS_IMETHODIMP
 IdentityCryptoService::GenerateKeyPair(
--- a/toolkit/mozapps/update/updater/updater.cpp
+++ b/toolkit/mozapps/update/updater/updater.cpp
@@ -1081,17 +1081,17 @@ static void backup_finish(const NS_tchar
 //-----------------------------------------------------------------------------
 
 static int DoUpdate();
 
 class Action
 {
 public:
   Action() : mProgressCost(1), mNext(nullptr) { }
-  virtual ~Action() { }
+  virtual ~Action() = default;
 
   virtual int Parse(NS_tchar *line) = 0;
 
   // Do any preprocessing to ensure that the action can be performed.  Execute
   // will be called if this Action and all others return OK from this method.
   virtual int Prepare() = 0;
 
   // Perform the operation.  Return OK to indicate success.  After all actions
--- a/toolkit/system/gnome/nsGIOService.cpp
+++ b/toolkit/system/gnome/nsGIOService.cpp
@@ -81,17 +81,17 @@ nsGIOMimeApp::Launch(const nsACString& a
     return NS_ERROR_FAILURE;
   }
 
   return NS_OK;
 }
 
 class GIOUTF8StringEnumerator final : public nsIUTF8StringEnumerator
 {
-  ~GIOUTF8StringEnumerator() { }
+  ~GIOUTF8StringEnumerator() = default;
 
 public:
   GIOUTF8StringEnumerator() : mIndex(0) { }
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIUTF8STRINGENUMERATOR
 
   nsTArray<nsCString> mStrings;
--- a/toolkit/system/gnome/nsSystemAlertsService.cpp
+++ b/toolkit/system/gnome/nsSystemAlertsService.cpp
@@ -12,22 +12,19 @@
 NS_IMPL_ADDREF(nsSystemAlertsService)
 NS_IMPL_RELEASE(nsSystemAlertsService)
 
 NS_INTERFACE_MAP_BEGIN(nsSystemAlertsService)
    NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIAlertsService)
    NS_INTERFACE_MAP_ENTRY(nsIAlertsService)
 NS_INTERFACE_MAP_END_THREADSAFE
 
-nsSystemAlertsService::nsSystemAlertsService()
-{
-}
+nsSystemAlertsService::nsSystemAlertsService() = default;
 
-nsSystemAlertsService::~nsSystemAlertsService()
-{}
+nsSystemAlertsService::~nsSystemAlertsService() = default;
 
 nsresult
 nsSystemAlertsService::Init()
 {
   return NS_OK;
 }
 
 NS_IMETHODIMP nsSystemAlertsService::ShowAlertNotification(const nsAString & aImageUrl, const nsAString & aAlertTitle, 
--- a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
+++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
@@ -28,17 +28,17 @@ public:
 
   nsUnixSystemProxySettings()
     : mSchemeProxySettings(4)
   {
   }
   nsresult Init();
 
 private:
-  ~nsUnixSystemProxySettings() {}
+  ~nsUnixSystemProxySettings() = default;
   
   nsCOMPtr<nsIGConfService> mGConf;
   nsCOMPtr<nsIGSettingsService> mGSettings;
   nsCOMPtr<nsIGSettingsCollection> mProxySettings;
   nsInterfaceHashtable<nsCStringHashKey, nsIGSettingsCollection> mSchemeProxySettings;
   bool IsProxyMode(const char* aMode);
   nsresult SetProxyResultFromGConf(const char* aKeyBase, const char* aType, nsACString& aResult);
   nsresult GetProxyFromGConf(const nsACString& aScheme, const nsACString& aHost, int32_t aPort, nsACString& aResult);
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -650,17 +650,17 @@ class nsXULAppInfo : public nsIXULAppInf
 #ifdef MOZ_CRASHREPORTER
                      public nsICrashReporter,
                      public nsIFinishDumpingCallback,
 #endif
                      public nsIXULRuntime
 
 {
 public:
-  constexpr nsXULAppInfo() {}
+  constexpr nsXULAppInfo() = default;
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSIPLATFORMINFO
   NS_DECL_NSIXULAPPINFO
   NS_DECL_NSIXULRUNTIME
   NS_DECL_NSIOBSERVER
 #ifdef MOZ_CRASHREPORTER
   NS_DECL_NSICRASHREPORTER
   NS_DECL_NSIFINISHDUMPINGCALLBACK
@@ -1483,17 +1483,17 @@ class nsSingletonFactory final : public 
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIFACTORY
 
   explicit nsSingletonFactory(nsISupports* aSingleton);
 
 private:
-  ~nsSingletonFactory() { }
+  ~nsSingletonFactory() = default;
   nsCOMPtr<nsISupports> mSingleton;
 };
 
 nsSingletonFactory::nsSingletonFactory(nsISupports* aSingleton)
   : mSingleton(aSingleton)
 {
   NS_ASSERTION(mSingleton, "Singleton was null!");
 }