Bug 1613985 - Use default for equivalent-to-default constructors/destructors in toolkit. r=mossop

Depends on D66008

Differential Revision: https://phabricator.services.mozilla.com/D66010

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Simon Giesecke 2020-03-10 08:48:24 +00:00
parent d0f38fe1cc
commit 8ad76c7e47
64 changed files with 115 additions and 118 deletions

View File

@ -25,7 +25,7 @@ NS_IMPL_ISUPPORTS(AlertNotification, nsIAlertNotification)
AlertNotification::AlertNotification()
: mTextClickable(false), mInPrivateBrowsing(false) {}
AlertNotification::~AlertNotification() {}
AlertNotification::~AlertNotification() = default;
NS_IMETHODIMP
AlertNotification::Init(const nsAString& aName, const nsAString& aImageURL,

View File

@ -63,7 +63,7 @@ class IconCallback final : public nsIFaviconDataCallback {
}
private:
virtual ~IconCallback() {}
virtual ~IconCallback() = default;
nsCOMPtr<nsIAlertsService> mBackend;
nsCOMPtr<nsIAlertNotification> mAlert;
@ -138,7 +138,7 @@ nsAlertsService::nsAlertsService() : mBackend(nullptr) {
mBackend = do_GetService(NS_SYSTEMALERTSERVICE_CONTRACTID);
}
nsAlertsService::~nsAlertsService() {}
nsAlertsService::~nsAlertsService() = default;
bool nsAlertsService::ShouldShowAlert() {
bool result = true;

View File

@ -34,12 +34,12 @@ class nsXULAlerts : public nsIAlertsService,
NS_DECL_NSIALERTSSERVICE
NS_DECL_ISUPPORTS
nsXULAlerts() {}
nsXULAlerts() = default;
static already_AddRefed<nsXULAlerts> GetInstance();
protected:
virtual ~nsXULAlerts() {}
virtual ~nsXULAlerts() = default;
void PersistentAlertFinished();
nsInterfaceHashtable<nsStringHashKey, mozIDOMWindowProxy> mNamedWindows;
@ -69,7 +69,7 @@ class nsXULAlertObserver : public nsIObserver {
void SetAlertWindow(mozIDOMWindowProxy* aWindow) { mAlertWindow = aWindow; }
protected:
virtual ~nsXULAlertObserver() {}
virtual ~nsXULAlertObserver() = default;
RefPtr<nsXULAlerts> mXULAlerts;
nsString mAlertName;

View File

@ -46,7 +46,7 @@ class nsAutoCompleteSimpleResult final : public nsIAutoCompleteSimpleResult {
nsresult AppendResult(nsIAutoCompleteResult* aResult);
private:
~nsAutoCompleteSimpleResult() {}
~nsAutoCompleteSimpleResult() = default;
protected:
typedef nsTArray<AutoCompleteSimpleResultMatch> MatchesArray;

View File

@ -742,7 +742,7 @@ BackgroundHangMonitor::BackgroundHangMonitor()
#endif
}
BackgroundHangMonitor::~BackgroundHangMonitor() {}
BackgroundHangMonitor::~BackgroundHangMonitor() = default;
void BackgroundHangMonitor::NotifyActivity() {
#ifdef MOZ_ENABLE_BACKGROUND_HANG_MONITOR

View File

@ -46,7 +46,7 @@ class nsHangDetails : public nsIHangDetails {
void Submit();
private:
virtual ~nsHangDetails() {}
virtual ~nsHangDetails() = default;
HangDetails mDetails;
PersistedToDisk mPersistedToDisk;

View File

@ -10,9 +10,9 @@
#include "nsContentPolicyUtils.h"
#include "nsNetUtil.h"
nsWebBrowserContentPolicy::nsWebBrowserContentPolicy() {}
nsWebBrowserContentPolicy::nsWebBrowserContentPolicy() = default;
nsWebBrowserContentPolicy::~nsWebBrowserContentPolicy() {}
nsWebBrowserContentPolicy::~nsWebBrowserContentPolicy() = default;
NS_IMPL_ISUPPORTS(nsWebBrowserContentPolicy, nsIContentPolicy)

View File

@ -13,7 +13,7 @@ class nsIURI;
class DownloadPlatform : public mozIDownloadPlatform {
protected:
virtual ~DownloadPlatform() {}
virtual ~DownloadPlatform() = default;
public:
NS_DECL_ISUPPORTS

View File

@ -76,7 +76,7 @@ class MatchGlobSet final : public nsTArray<RefPtr<MatchGlob>> {
public:
// Note: We can't use the nsTArray constructors directly, since the static
// analyzer doesn't handle their MOZ_IMPLICIT annotations correctly.
MatchGlobSet() {}
MatchGlobSet() = default;
explicit MatchGlobSet(size_type aCapacity) : nsTArray(aCapacity) {}
explicit MatchGlobSet(const nsTArray& aOther) : nsTArray(aOther) {}
MOZ_IMPLICIT MatchGlobSet(nsTArray&& aOther) : nsTArray(std::move(aOther)) {}

View File

@ -106,7 +106,7 @@ class StreamFilterChild final : public PStreamFilterChild,
}
private:
~StreamFilterChild() {}
~StreamFilterChild() = default;
void SetNextState();

View File

@ -23,7 +23,7 @@ class FinalizationWitnessService final : public nsIFinalizationWitnessService,
nsresult Init();
private:
~FinalizationWitnessService() {}
~FinalizationWitnessService() = default;
void operator=(const FinalizationWitnessService* other) = delete;
};

View File

@ -54,7 +54,7 @@ nsWebBrowserFind::nsWebBrowserFind()
mSearchSubFrames(true),
mSearchParentFrames(true) {}
nsWebBrowserFind::~nsWebBrowserFind() {}
nsWebBrowserFind::~nsWebBrowserFind() = default;
NS_IMPL_ISUPPORTS(nsWebBrowserFind, nsIWebBrowserFind,
nsIWebBrowserFindInFrames)

View File

@ -67,7 +67,7 @@ public:
}
// Boilerplate
SecureAllocator() {}
SecureAllocator() = default;
template <typename U> SecureAllocator(const SecureAllocator<U>&) {}
template <typename U> struct rebind { using other = SecureAllocator<U>; };
};

View File

@ -39,7 +39,7 @@ class nsMediaSniffer final : public nsIContentSniffer {
NS_DECL_NSICONTENTSNIFFER
private:
~nsMediaSniffer() {}
~nsMediaSniffer() = default;
static nsMediaSnifferEntry sSnifferEntries[];
};

View File

@ -19,7 +19,7 @@ class NativeOSFileInternalsService final
NS_DECL_ISUPPORTS
NS_DECL_NSINATIVEOSFILEINTERNALSSERVICE
private:
~NativeOSFileInternalsService() {}
~NativeOSFileInternalsService() = default;
// Avoid accidental use of built-in operator=
void operator=(const NativeOSFileInternalsService& other) = delete;
};

View File

@ -409,7 +409,7 @@ Database::GetProfileBeforeChangePhase() {
return shutdownPhase.forget();
}
Database::~Database() {}
Database::~Database() = default;
bool Database::IsShutdownStarted() const {
if (!mConnectionShutdown) {

View File

@ -154,7 +154,7 @@ class AsyncFetchAndSetIconForPage final : public Runnable,
private:
nsresult FetchFromNetwork();
virtual ~AsyncFetchAndSetIconForPage() {}
virtual ~AsyncFetchAndSetIconForPage() = default;
nsMainThreadPtrHandle<nsIFaviconDataCallback> mCallback;
IconData mIcon;

View File

@ -27,19 +27,19 @@ namespace places {
class WeakAsyncStatementCallback : public mozIStorageStatementCallback {
public:
NS_DECL_MOZISTORAGESTATEMENTCALLBACK
WeakAsyncStatementCallback() {}
WeakAsyncStatementCallback() = default;
protected:
virtual ~WeakAsyncStatementCallback() {}
virtual ~WeakAsyncStatementCallback() = default;
};
class AsyncStatementCallback : public WeakAsyncStatementCallback {
public:
NS_DECL_ISUPPORTS
AsyncStatementCallback() {}
AsyncStatementCallback() = default;
protected:
virtual ~AsyncStatementCallback() {}
virtual ~AsyncStatementCallback() = default;
};
/**

View File

@ -458,7 +458,7 @@ class VisitedQuery final : public AsyncStatementCallback {
const nsMainThreadPtrHandle<mozIVisitedStatusCallback>& aCallback)
: mURI(aURI), mCallback(aCallback), mIsVisited(false) {}
~VisitedQuery() {}
~VisitedQuery() = default;
nsCOMPtr<nsIURI> mURI;
nsMainThreadPtrHandle<mozIVisitedStatusCallback> mCallback;
@ -1509,7 +1509,7 @@ class ConcurrentStatementsHolder final : public mozIStorageCompletionCallback {
}
private:
~ConcurrentStatementsHolder() {}
~ConcurrentStatementsHolder() = default;
nsCOMPtr<mozIStorageAsyncConnection> mReadOnlyDBConn;
nsCOMPtr<mozIStorageAsyncStatement> mIsVisitedStatement;

View File

@ -25,7 +25,7 @@ class INativePlacesEventCallback
virtual void HandlePlacesEvent(const PlacesEventSequence& aEvents) = 0;
protected:
virtual ~INativePlacesEventCallback() {}
virtual ~INativePlacesEventCallback() = default;
};
} // namespace places

View File

@ -30,7 +30,7 @@ class PlaceInfo final : public mozIPlaceInfo {
const VisitsArray& aVisits);
private:
~PlaceInfo() {}
~PlaceInfo() = default;
const int64_t mId;
const nsCString mGUID;

View File

@ -72,7 +72,7 @@ class MatchAutoCompleteFunction final : public mozIStorageFunction {
static nsresult create(mozIStorageConnection* aDBConn);
private:
~MatchAutoCompleteFunction() {}
~MatchAutoCompleteFunction() = default;
/**
* IntegerVariants for 0 and 1 are frequently used in awesomebar queries,
@ -213,7 +213,7 @@ class CalculateFrecencyFunction final : public mozIStorageFunction {
static nsresult create(mozIStorageConnection* aDBConn);
private:
~CalculateFrecencyFunction() {}
~CalculateFrecencyFunction() = default;
};
/**
@ -236,7 +236,7 @@ class GenerateGUIDFunction final : public mozIStorageFunction {
static nsresult create(mozIStorageConnection* aDBConn);
private:
~GenerateGUIDFunction() {}
~GenerateGUIDFunction() = default;
};
/**
@ -259,7 +259,7 @@ class IsValidGUIDFunction final : public mozIStorageFunction {
static nsresult create(mozIStorageConnection* aDBConn);
private:
~IsValidGUIDFunction() {}
~IsValidGUIDFunction() = default;
};
/**
@ -284,7 +284,7 @@ class GetUnreversedHostFunction final : public mozIStorageFunction {
static nsresult create(mozIStorageConnection* aDBConn);
private:
~GetUnreversedHostFunction() {}
~GetUnreversedHostFunction() = default;
};
////////////////////////////////////////////////////////////////////////////////
@ -313,7 +313,7 @@ class FixupURLFunction final : public mozIStorageFunction {
static nsresult create(mozIStorageConnection* aDBConn);
private:
~FixupURLFunction() {}
~FixupURLFunction() = default;
};
////////////////////////////////////////////////////////////////////////////////
@ -350,7 +350,7 @@ class FrecencyNotificationFunction final : public mozIStorageFunction {
static nsresult create(mozIStorageConnection* aDBConn);
private:
~FrecencyNotificationFunction() {}
~FrecencyNotificationFunction() = default;
};
////////////////////////////////////////////////////////////////////////////////
@ -379,7 +379,7 @@ class StoreLastInsertedIdFunction final : public mozIStorageFunction {
static nsresult create(mozIStorageConnection* aDBConn);
private:
~StoreLastInsertedIdFunction() {}
~StoreLastInsertedIdFunction() = default;
};
////////////////////////////////////////////////////////////////////////////////
@ -407,7 +407,7 @@ class HashFunction final : public mozIStorageFunction {
static nsresult create(mozIStorageConnection* aDBConn);
private:
~HashFunction() {}
~HashFunction() = default;
};
////////////////////////////////////////////////////////////////////////////////
@ -435,7 +435,7 @@ class GetQueryParamFunction final : public mozIStorageFunction {
static nsresult create(mozIStorageConnection* aDBConn);
private:
~GetQueryParamFunction() {}
~GetQueryParamFunction() = default;
};
////////////////////////////////////////////////////////////////////////////////
@ -465,7 +465,7 @@ class GetPrefixFunction final : public mozIStorageFunction {
static nsresult create(mozIStorageConnection* aDBConn);
private:
~GetPrefixFunction() {}
~GetPrefixFunction() = default;
};
////////////////////////////////////////////////////////////////////////////////
@ -495,7 +495,7 @@ class GetHostAndPortFunction final : public mozIStorageFunction {
static nsresult create(mozIStorageConnection* aDBConn);
private:
~GetHostAndPortFunction() {}
~GetHostAndPortFunction() = default;
};
////////////////////////////////////////////////////////////////////////////////
@ -526,7 +526,7 @@ class StripPrefixAndUserinfoFunction final : public mozIStorageFunction {
static nsresult create(mozIStorageConnection* aDBConn);
private:
~StripPrefixAndUserinfoFunction() {}
~StripPrefixAndUserinfoFunction() = default;
};
////////////////////////////////////////////////////////////////////////////////
@ -552,7 +552,7 @@ class IsFrecencyDecayingFunction final : public mozIStorageFunction {
static nsresult create(mozIStorageConnection* aDBConn);
private:
~IsFrecencyDecayingFunction() {}
~IsFrecencyDecayingFunction() = default;
};
////////////////////////////////////////////////////////////////////////////////
@ -575,7 +575,7 @@ class SqrtFunction final : public mozIStorageFunction {
static nsresult create(mozIStorageConnection* aDBConn);
private:
~SqrtFunction() {}
~SqrtFunction() = default;
};
////////////////////////////////////////////////////////////////////////////////
@ -600,7 +600,7 @@ class NoteSyncChangeFunction final : public mozIStorageFunction {
static nsresult create(mozIStorageConnection* aDBConn);
private:
~NoteSyncChangeFunction() {}
~NoteSyncChangeFunction() = default;
};
} // namespace places

View File

@ -114,7 +114,7 @@ class PlacesShutdownBlocker : public nsIAsyncShutdownBlocker,
static Atomic<bool> sIsStarted;
virtual ~PlacesShutdownBlocker() {}
virtual ~PlacesShutdownBlocker() = default;
};
/**
@ -130,7 +130,7 @@ class ClientsShutdownBlocker final : public PlacesShutdownBlocker {
NS_IMETHOD Done() override;
private:
~ClientsShutdownBlocker() {}
~ClientsShutdownBlocker() = default;
};
/**
@ -147,7 +147,7 @@ class ConnectionShutdownBlocker final : public PlacesShutdownBlocker,
NS_IMETHOD Done() override;
private:
~ConnectionShutdownBlocker() {}
~ConnectionShutdownBlocker() = default;
// The owning database.
// The cycle is broken in method Complete(), once the connection

View File

@ -19,7 +19,7 @@ VisitInfo::VisitInfo(int64_t aVisitId, PRTime aVisitDate,
mTransitionType(aTransitionType),
mReferrer(aReferrer) {}
VisitInfo::~VisitInfo() {}
VisitInfo::~VisitInfo() = default;
////////////////////////////////////////////////////////////////////////////////
//// mozIVisitInfo

View File

@ -161,7 +161,7 @@ class faviconAsyncLoader : public AsyncStatementCallback {
}
protected:
virtual ~faviconAsyncLoader() {}
virtual ~faviconAsyncLoader() = default;
private:
nsCOMPtr<nsIChannel> mChannel;

View File

@ -24,13 +24,13 @@
class nsAnnoProtocolHandler final : public nsIProtocolHandler,
public nsSupportsWeakReference {
public:
nsAnnoProtocolHandler() {}
nsAnnoProtocolHandler() = default;
NS_DECL_ISUPPORTS
NS_DECL_NSIPROTOCOLHANDLER
private:
~nsAnnoProtocolHandler() {}
~nsAnnoProtocolHandler() = default;
protected:
nsresult ParseAnnoURI(nsIURI* aURI, nsIURI** aResultURI, nsCString& aName);

View File

@ -851,7 +851,7 @@ nsFaviconService::PreferredSizeFromURI(nsIURI* aURI, uint16_t* _size) {
//// ExpireFaviconsStatementCallbackNotifier
ExpireFaviconsStatementCallbackNotifier::
ExpireFaviconsStatementCallbackNotifier() {}
ExpireFaviconsStatementCallbackNotifier() = default;
NS_IMETHODIMP
ExpireFaviconsStatementCallbackNotifier::HandleCompletion(uint16_t aReason) {

View File

@ -63,7 +63,7 @@ class nsNavHistoryQuery final : public nsINavHistoryQuery {
nsresult Clone(nsNavHistoryQuery** _clone);
private:
~nsNavHistoryQuery() {}
~nsNavHistoryQuery() = default;
protected:
// IF YOU ADD MORE ITEMS:
@ -121,7 +121,7 @@ class nsNavHistoryQueryOptions final : public nsINavHistoryQueryOptions {
nsresult Clone(nsNavHistoryQueryOptions** _clone);
private:
~nsNavHistoryQueryOptions() {}
~nsNavHistoryQueryOptions() = default;
// IF YOU ADD MORE ITEMS:
// * Add to the copy constructor

View File

@ -45,7 +45,7 @@ class nsTrimInt64HashKey : public PLDHashEntryHdr {
explicit nsTrimInt64HashKey(KeyTypePointer aKey) : mValue(*aKey) {}
nsTrimInt64HashKey(const nsTrimInt64HashKey& toCopy)
: mValue(toCopy.mValue) {}
~nsTrimInt64HashKey() {}
~nsTrimInt64HashKey() = default;
KeyType GetKey() const { return mValue; }
bool KeyEquals(KeyTypePointer aKey) const { return *aKey == mValue; }
@ -330,7 +330,7 @@ class nsNavHistoryResultNode : public nsINavHistoryResultNode {
virtual nsresult OnMobilePrefChanged(bool newValue) { return NS_OK; };
protected:
virtual ~nsNavHistoryResultNode() {}
virtual ~nsNavHistoryResultNode() = default;
public:
nsNavHistoryResult* GetResult();

View File

@ -101,7 +101,7 @@ class WaitForTopicSpinner final : public nsIObserver {
}
private:
~WaitForTopicSpinner() {}
~WaitForTopicSpinner() = default;
bool mTopicReceived;
PRIntervalTime mStartTime;
@ -121,7 +121,7 @@ class PlacesAsyncStatementSpinner final : public mozIStorageStatementCallback {
uint16_t completionReason;
protected:
~PlacesAsyncStatementSpinner() {}
~PlacesAsyncStatementSpinner() = default;
volatile bool mCompleted;
};
@ -315,7 +315,7 @@ static const char TOPIC_PLACES_CONNECTION_CLOSED[] = "places-connection-closed";
class WaitForConnectionClosed final : public nsIObserver {
RefPtr<WaitForTopicSpinner> mSpinner;
~WaitForConnectionClosed() {}
~WaitForConnectionClosed() = default;
public:
NS_DECL_ISUPPORTS

View File

@ -15,7 +15,7 @@ NS_IMPL_ISUPPORTS(PrintProgressDialogParent, nsIObserver)
PrintProgressDialogParent::PrintProgressDialogParent() : mActive(true) {}
PrintProgressDialogParent::~PrintProgressDialogParent() {}
PrintProgressDialogParent::~PrintProgressDialogParent() = default;
void PrintProgressDialogParent::SetWebProgressListener(
nsIWebProgressListener* aListener) {

View File

@ -311,7 +311,7 @@ PrintingParent::PrintingParent() {
MOZ_ASSERT(mPrintSettingsSvc);
}
PrintingParent::~PrintingParent() {}
PrintingParent::~PrintingParent() = default;
} // namespace embedding
} // namespace mozilla

View File

@ -29,9 +29,9 @@ static StaticRefPtr<nsPrintingProxy> sPrintingProxyInstance;
NS_IMPL_ISUPPORTS(nsPrintingProxy, nsIPrintingPromptService)
nsPrintingProxy::nsPrintingProxy() {}
nsPrintingProxy::nsPrintingProxy() = default;
nsPrintingProxy::~nsPrintingProxy() {}
nsPrintingProxy::~nsPrintingProxy() = default;
/* static */
already_AddRefed<nsPrintingProxy> nsPrintingProxy::GetInstance() {

View File

@ -8,9 +8,9 @@
NS_IMPL_ISUPPORTS(nsPrintProgressParams, nsIPrintProgressParams)
nsPrintProgressParams::nsPrintProgressParams() {}
nsPrintProgressParams::nsPrintProgressParams() = default;
nsPrintProgressParams::~nsPrintProgressParams() {}
nsPrintProgressParams::~nsPrintProgressParams() = default;
NS_IMETHODIMP
nsPrintProgressParams::GetDocTitle(nsAString& aDocTitle) {

View File

@ -16,7 +16,7 @@
class nsRemoteClient {
public:
virtual ~nsRemoteClient(){};
virtual ~nsRemoteClient() = default;
/**
* Initializes the client

View File

@ -112,7 +112,7 @@ class KeyboardHashKey : public PLDHashEntryHdr {
mKeyIdx(std::move(aOther.mKeyIdx)),
mKey(std::move(aOther.mKey)) {}
~KeyboardHashKey() {}
~KeyboardHashKey() = default;
bool KeyEquals(KeyTypePointer aOther) const {
return mLang == aOther->mLang && mRegion == aOther->mRegion &&
@ -234,9 +234,9 @@ class nsRFPService final : public nsIObserver {
private:
nsresult Init();
nsRFPService() {}
nsRFPService() = default;
~nsRFPService() {}
~nsRFPService() = default;
void UpdateTimers();
void UpdateRFPPref();

View File

@ -37,9 +37,9 @@ typedef mozilla::Variant<nsString, bool,
struct CollectedInputDataValue {
nsString id;
nsString type;
InputDataValue value;
InputDataValue value{false};
CollectedInputDataValue() : value(false){};
CollectedInputDataValue() = default;
};
/*

View File

@ -41,7 +41,7 @@ class nsAppStartup final : public nsIAppStartup,
nsresult Init();
private:
~nsAppStartup() {}
~nsAppStartup() = default;
void CloseAllWindows();

View File

@ -42,7 +42,7 @@ struct BaseScalarInfo {
key_offset(aKeyOffset),
products(aProducts),
builtin(aBuiltin) {}
virtual ~BaseScalarInfo() {}
virtual ~BaseScalarInfo() = default;
virtual const char* name() const = 0;
virtual const char* expiration() const = 0;

View File

@ -74,7 +74,7 @@ class OriginMetricIDHashKey : public PLDHashEntryHdr {
explicit OriginMetricIDHashKey(KeyTypePointer aKey) : mValue(*aKey) {}
OriginMetricIDHashKey(OriginMetricIDHashKey&& aOther)
: PLDHashEntryHdr(std::move(aOther)), mValue(std::move(aOther.mValue)) {}
~OriginMetricIDHashKey() {}
~OriginMetricIDHashKey() = default;
KeyType GetKey() const { return mValue; }
bool KeyEquals(KeyTypePointer aKey) const { return *aKey == mValue; }

View File

@ -29,7 +29,7 @@ class nsTerminator final : public nsIObserver {
void UpdateTelemetry();
void UpdateCrashReport(const char* aTopic);
~nsTerminator() {}
~nsTerminator() = default;
bool mInitialized;
int32_t mCurrentStep;

View File

@ -23,7 +23,7 @@ class PageThumbsProtocol final : public nsIProtocolHandler {
NS_DECL_NSIPROTOCOLHANDLER
private:
~PageThumbsProtocol() {}
~PageThumbsProtocol() = default;
nsresult GetFilePathForURL(nsIURI* aURI, nsIFile** _retval);
nsresult ParseProtocolURL(nsIURI* aURI, nsString& aParsedURL);
};

View File

@ -45,7 +45,7 @@ class TableUpdate {
}
protected:
virtual ~TableUpdate() {}
virtual ~TableUpdate() = default;
private:
virtual int Tag() const = 0;

View File

@ -90,7 +90,7 @@ class LookupResult {
bool mProtocolV2;
private:
~LookupResult() {}
~LookupResult() = default;
};
typedef nsTArray<RefPtr<LookupResult>> LookupResultArray;
@ -115,7 +115,7 @@ class CacheResult {
Prefix prefix;
protected:
virtual ~CacheResult() {}
virtual ~CacheResult() = default;
};
class CacheResultV2 final : public CacheResult {
@ -270,7 +270,7 @@ class LookupCache {
virtual nsresult ClearLegacyFile() = 0;
protected:
virtual ~LookupCache() {}
virtual ~LookupCache() = default;
// Buffer size for file read/write
static const uint32_t MAX_BUFFER_SIZE;
@ -329,7 +329,7 @@ class LookupCacheV2 final : public LookupCache {
virtual nsCString GetPrefixSetSuffix() const override;
private:
~LookupCacheV2() {}
~LookupCacheV2() = default;
virtual int Ver() const override { return VER; }

View File

@ -51,7 +51,7 @@ class LookupCacheV4 final : public LookupCache {
nsCString GetMetadataSuffix() const;
private:
~LookupCacheV4() {}
~LookupCacheV4() = default;
virtual int Ver() const override { return VER; }

View File

@ -72,7 +72,7 @@ static bool ParseChunkRange(nsACString::const_iterator& aBegin,
ProtocolParser::ProtocolParser() : mUpdateStatus(NS_OK), mUpdateWaitSec(0) {}
ProtocolParser::~ProtocolParser() {}
ProtocolParser::~ProtocolParser() = default;
nsresult ProtocolParser::Begin(const nsACString& aTable,
const nsTArray<nsCString>& aUpdateTables) {
@ -113,7 +113,7 @@ RefPtr<TableUpdate> ProtocolParser::GetTableUpdate(const nsACString& aTable) {
ProtocolParserV2::ProtocolParserV2()
: mState(PROTOCOL_STATE_CONTROL), mTableUpdate(nullptr) {}
ProtocolParserV2::~ProtocolParserV2() {}
ProtocolParserV2::~ProtocolParserV2() = default;
void ProtocolParserV2::SetCurrentTable(const nsACString& aTable) {
RefPtr<TableUpdate> update = GetTableUpdate(aTable);
@ -708,9 +708,9 @@ RefPtr<TableUpdate> ProtocolParserV2::CreateTableUpdate(
///////////////////////////////////////////////////////////////////////
// ProtocolParserProtobuf
ProtocolParserProtobuf::ProtocolParserProtobuf() {}
ProtocolParserProtobuf::ProtocolParserProtobuf() = default;
ProtocolParserProtobuf::~ProtocolParserProtobuf() {}
ProtocolParserProtobuf::~ProtocolParserProtobuf() = default;
void ProtocolParserProtobuf::SetCurrentTable(const nsACString& aTable) {
// Should never occur.

View File

@ -23,7 +23,7 @@ class nsCheckSummedOutputStream : public nsBufferedOutputStream {
static const uint32_t CHECKSUM_SIZE = 16;
static const uint32_t MAX_BUFFER_SIZE = 64 * 1024;
nsCheckSummedOutputStream() {}
nsCheckSummedOutputStream() = default;
NS_IMETHOD Finish() override;
NS_IMETHOD Write(const char* buf, uint32_t count, uint32_t* result) override;

View File

@ -1495,7 +1495,7 @@ class nsUrlClassifierClassifyCallback final
nsresult errorCode;
};
~nsUrlClassifierClassifyCallback(){};
~nsUrlClassifierClassifyCallback() = default;
nsCOMPtr<nsIURIClassifierCallback> mCallback;
nsTArray<ClassifyMatchedInfo> mMatchedArray;

View File

@ -69,7 +69,7 @@ nsUrlClassifierCacheEntry::GetMatches(nsIArray** aMatches) {
NS_IMPL_ISUPPORTS(nsUrlClassifierCacheInfo, nsIUrlClassifierCacheInfo)
nsUrlClassifierCacheInfo::nsUrlClassifierCacheInfo() {}
nsUrlClassifierCacheInfo::nsUrlClassifierCacheInfo() = default;
NS_IMETHODIMP
nsUrlClassifierCacheInfo::GetTable(nsACString& aTable) {

View File

@ -22,7 +22,7 @@ class nsUrlClassifierPositiveCacheEntry final
NS_DECL_NSIURLCLASSIFIERPOSITIVECACHEENTRY
private:
~nsUrlClassifierPositiveCacheEntry() {}
~nsUrlClassifierPositiveCacheEntry() = default;
public:
nsCString fullhash;
@ -38,7 +38,7 @@ class nsUrlClassifierCacheEntry final : public nsIUrlClassifierCacheEntry {
NS_DECL_NSIURLCLASSIFIERCACHEENTRY
private:
~nsUrlClassifierCacheEntry() {}
~nsUrlClassifierCacheEntry() = default;
public:
nsCString prefix;
@ -56,7 +56,7 @@ class nsUrlClassifierCacheInfo final : public nsIUrlClassifierCacheInfo {
NS_DECL_NSIURLCLASSIFIERCACHEINFO
private:
~nsUrlClassifierCacheInfo() {}
~nsUrlClassifierCacheInfo() = default;
public:
nsCString table;

View File

@ -195,7 +195,7 @@ class UrlClassifierDBServiceWorkerProxy final
nsIUrlClassifierGetCacheCallback* aCallback) const;
private:
~UrlClassifierDBServiceWorkerProxy() {}
~UrlClassifierDBServiceWorkerProxy() = default;
const RefPtr<nsUrlClassifierDBServiceWorker> mTarget;
};
@ -231,7 +231,7 @@ class UrlClassifierLookupCallbackProxy final
};
private:
~UrlClassifierLookupCallbackProxy() {}
~UrlClassifierLookupCallbackProxy() = default;
const nsMainThreadPtrHandle<nsIUrlClassifierLookupCallback> mTarget;
};
@ -262,7 +262,7 @@ class UrlClassifierCallbackProxy final : public nsIUrlClassifierCallback {
};
private:
~UrlClassifierCallbackProxy() {}
~UrlClassifierCallbackProxy() = default;
const nsMainThreadPtrHandle<nsIUrlClassifierCallback> mTarget;
};
@ -351,7 +351,7 @@ class UrlClassifierUpdateObserverProxy final
};
private:
~UrlClassifierUpdateObserverProxy() {}
~UrlClassifierUpdateObserverProxy() = default;
const nsMainThreadPtrHandle<nsIUrlClassifierUpdateObserver> mTarget;
};

View File

@ -44,7 +44,7 @@ class nsUrlClassifierStreamUpdater final
private:
// No subclassing
~nsUrlClassifierStreamUpdater() {}
~nsUrlClassifierStreamUpdater() = default;
// When the dbservice sends an UpdateComplete or UpdateFailure, we call this
// to reset the stream updater.

View File

@ -168,7 +168,7 @@ class MyParseCallback final : public nsIUrlClassifierParseFindFullHashCallback {
ASSERT_TRUE(aToVerify == aExpected.mSecs);
}
~MyParseCallback() {}
~MyParseCallback() = default;
uint32_t& mCallbackCount;
};

View File

@ -97,7 +97,7 @@ struct nsWatcherWindowEntry {
}
ReferenceSelf();
}
~nsWatcherWindowEntry() {}
~nsWatcherWindowEntry() = default;
void InsertAfter(nsWatcherWindowEntry* aOlder);
void Unlink();

View File

@ -116,9 +116,9 @@ class ThreadAnnotationSpan {
// the crash annotation file.
class ThreadAnnotationData {
public:
ThreadAnnotationData() {}
ThreadAnnotationData() = default;
~ThreadAnnotationData() {}
~ThreadAnnotationData() = default;
// Adds <pre> tid:"thread name",</pre> annotation to the current annotations.
// Returns an instance of ThreadAnnotationSpan for cleanup on thread

View File

@ -37,9 +37,9 @@ using namespace mozilla;
u"not supported in WebExtension code. For alternatives, please see: " \
u"https://developer.mozilla.org/Add-ons/WebExtensions/Tips"
AddonContentPolicy::AddonContentPolicy() {}
AddonContentPolicy::AddonContentPolicy() = default;
AddonContentPolicy::~AddonContentPolicy() {}
AddonContentPolicy::~AddonContentPolicy() = default;
NS_IMPL_ISUPPORTS(AddonContentPolicy, nsIContentPolicy, nsIAddonContentPolicy)

View File

@ -60,7 +60,7 @@ AddonManagerStartup& AddonManagerStartup::GetSingleton() {
return *singleton;
}
AddonManagerStartup::AddonManagerStartup() {}
AddonManagerStartup::AddonManagerStartup() = default;
nsIFile* AddonManagerStartup::ProfileDir() {
if (!mProfileDir) {
@ -681,9 +681,6 @@ struct ContentEntry final {
explicit ContentEntry(nsTArray<nsCString>& aArgs, uint8_t aFlags = 0)
: mArgs(aArgs), mFlags(aFlags) {}
ContentEntry(const ContentEntry& other)
: mArgs(other.mArgs), mFlags(other.mFlags) {}
AutoTArray<nsCString, 2> mArgs;
uint8_t mFlags;
};

View File

@ -19,7 +19,7 @@ typedef char NS_tchar;
// This class provides an API to extract files from an update archive.
class ArchiveReader {
public:
ArchiveReader() {}
ArchiveReader() = default;
~ArchiveReader() { Close(); }
int Open(const NS_tchar* path);

View File

@ -70,7 +70,7 @@ class nsProfileLock
#elif defined(XP_UNIX)
struct RemovePidLockFilesExiting {
RemovePidLockFilesExiting() {}
RemovePidLockFilesExiting() = default;
~RemovePidLockFilesExiting() { RemovePidLockFiles(false); }
};

View File

@ -16,7 +16,7 @@
}
class nsGIOService final : public nsIGIOService {
~nsGIOService() {}
~nsGIOService() = default;
public:
NS_DECL_ISUPPORTS

View File

@ -23,9 +23,9 @@ class BootstrapImpl final : public Bootstrap {
virtual void Dispose() override { delete this; }
public:
BootstrapImpl() {}
BootstrapImpl() = default;
~BootstrapImpl() {}
~BootstrapImpl() = default;
virtual void NS_LogInit() override { ::NS_LogInit(); }

View File

@ -439,7 +439,7 @@ class nsXULAppInfo : public nsIXULAppInfo,
{
public:
constexpr nsXULAppInfo() {}
constexpr nsXULAppInfo() = default;
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIPLATFORMINFO
NS_DECL_NSIXULAPPINFO
@ -1281,7 +1281,7 @@ class nsSingletonFactory final : public nsIFactory {
explicit nsSingletonFactory(nsISupports* aSingleton);
private:
~nsSingletonFactory() {}
~nsSingletonFactory() = default;
nsCOMPtr<nsISupports> mSingleton;
};

View File

@ -5,9 +5,9 @@
#include "nsNativeAppSupportBase.h"
nsNativeAppSupportBase::nsNativeAppSupportBase() {}
nsNativeAppSupportBase::nsNativeAppSupportBase() = default;
nsNativeAppSupportBase::~nsNativeAppSupportBase() {}
nsNativeAppSupportBase::~nsNativeAppSupportBase() = default;
NS_IMPL_ISUPPORTS(nsNativeAppSupportBase, nsINativeAppSupport)

View File

@ -706,7 +706,7 @@ NS_IMPL_ISUPPORTS(nsUpdateProcessor, nsIUpdateProcessor)
nsUpdateProcessor::nsUpdateProcessor() : mUpdaterPID(0) {}
nsUpdateProcessor::~nsUpdateProcessor() {}
nsUpdateProcessor::~nsUpdateProcessor() = default;
NS_IMETHODIMP
nsUpdateProcessor::ProcessUpdate() {