Skip to content

Commit

Permalink
fix: modernize-use-equals-default warnings (electron#44935)
Browse files Browse the repository at this point in the history
fix: use '= default' to define a trivial destructor [modernize-use-equals-default]
  • Loading branch information
ckerr authored Dec 3, 2024
1 parent 229c2a8 commit 158a87d
Show file tree
Hide file tree
Showing 14 changed files with 64 additions and 64 deletions.
2 changes: 1 addition & 1 deletion shell/browser/auto_updater.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Delegate {
const std::string& update_url) {}

protected:
virtual ~Delegate() {}
virtual ~Delegate() = default;
};

class AutoUpdater {
Expand Down
2 changes: 1 addition & 1 deletion shell/browser/browser_observer.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class BrowserObserver : public base::CheckedObserver {
#endif

protected:
~BrowserObserver() override {}
~BrowserObserver() override = default;
};

} // namespace electron
Expand Down
2 changes: 1 addition & 1 deletion shell/browser/extended_web_contents_observer.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class ExtendedWebContentsObserver : public base::CheckedObserver {
virtual void OnDevToolsResized() {}

protected:
~ExtendedWebContentsObserver() override {}
~ExtendedWebContentsObserver() override = default;
};

} // namespace electron
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,14 @@ class ExtensionActionFunction : public ExtensionFunction {
// show
class ExtensionActionShowFunction : public ExtensionActionFunction {
protected:
~ExtensionActionShowFunction() override {}
~ExtensionActionShowFunction() override = default;
ResponseAction RunExtensionAction() override;
};

// hide
class ExtensionActionHideFunction : public ExtensionActionFunction {
protected:
~ExtensionActionHideFunction() override {}
~ExtensionActionHideFunction() override = default;
ResponseAction RunExtensionAction() override;
};

Expand All @@ -123,72 +123,72 @@ class ExtensionActionSetIconFunction : public ExtensionActionFunction {
static void SetReportErrorForInvisibleIconForTesting(bool value);

protected:
~ExtensionActionSetIconFunction() override {}
~ExtensionActionSetIconFunction() override = default;
ResponseAction RunExtensionAction() override;
};

// setTitle
class ExtensionActionSetTitleFunction : public ExtensionActionFunction {
protected:
~ExtensionActionSetTitleFunction() override {}
~ExtensionActionSetTitleFunction() override = default;
ResponseAction RunExtensionAction() override;
};

// setPopup
class ExtensionActionSetPopupFunction : public ExtensionActionFunction {
protected:
~ExtensionActionSetPopupFunction() override {}
~ExtensionActionSetPopupFunction() override = default;
ResponseAction RunExtensionAction() override;
};

// setBadgeText
class ExtensionActionSetBadgeTextFunction : public ExtensionActionFunction {
protected:
~ExtensionActionSetBadgeTextFunction() override {}
~ExtensionActionSetBadgeTextFunction() override = default;
ResponseAction RunExtensionAction() override;
};

// setBadgeBackgroundColor
class ExtensionActionSetBadgeBackgroundColorFunction
: public ExtensionActionFunction {
protected:
~ExtensionActionSetBadgeBackgroundColorFunction() override {}
~ExtensionActionSetBadgeBackgroundColorFunction() override = default;
ResponseAction RunExtensionAction() override;
};

// getTitle
class ExtensionActionGetTitleFunction : public ExtensionActionFunction {
protected:
~ExtensionActionGetTitleFunction() override {}
~ExtensionActionGetTitleFunction() override = default;
ResponseAction RunExtensionAction() override;
};

// getPopup
class ExtensionActionGetPopupFunction : public ExtensionActionFunction {
protected:
~ExtensionActionGetPopupFunction() override {}
~ExtensionActionGetPopupFunction() override = default;
ResponseAction RunExtensionAction() override;
};

// openPopup
class ExtensionActionOpenPopupFunction : public ExtensionActionFunction {
protected:
~ExtensionActionOpenPopupFunction() override {}
~ExtensionActionOpenPopupFunction() override = default;
ResponseAction RunExtensionAction() override;
};

// getBadgeText
class ExtensionActionGetBadgeTextFunction : public ExtensionActionFunction {
protected:
~ExtensionActionGetBadgeTextFunction() override {}
~ExtensionActionGetBadgeTextFunction() override = default;
ResponseAction RunExtensionAction() override;
};

// getBadgeBackgroundColor
class ExtensionActionGetBadgeBackgroundColorFunction
: public ExtensionActionFunction {
protected:
~ExtensionActionGetBadgeBackgroundColorFunction() override {}
~ExtensionActionGetBadgeBackgroundColorFunction() override = default;
ResponseAction RunExtensionAction() override;
};

Expand All @@ -201,55 +201,55 @@ class ActionSetIconFunction : public ExtensionActionSetIconFunction {
DECLARE_EXTENSION_FUNCTION("action.setIcon", ACTION_SETICON)

protected:
~ActionSetIconFunction() override {}
~ActionSetIconFunction() override = default;
};

class ActionGetPopupFunction : public ExtensionActionGetPopupFunction {
public:
DECLARE_EXTENSION_FUNCTION("action.getPopup", ACTION_GETPOPUP)

protected:
~ActionGetPopupFunction() override {}
~ActionGetPopupFunction() override = default;
};

class ActionSetPopupFunction : public ExtensionActionSetPopupFunction {
public:
DECLARE_EXTENSION_FUNCTION("action.setPopup", ACTION_SETPOPUP)

protected:
~ActionSetPopupFunction() override {}
~ActionSetPopupFunction() override = default;
};

class ActionGetTitleFunction : public ExtensionActionGetTitleFunction {
public:
DECLARE_EXTENSION_FUNCTION("action.getTitle", ACTION_GETTITLE)

protected:
~ActionGetTitleFunction() override {}
~ActionGetTitleFunction() override = default;
};

class ActionSetTitleFunction : public ExtensionActionSetTitleFunction {
public:
DECLARE_EXTENSION_FUNCTION("action.setTitle", ACTION_SETTITLE)

protected:
~ActionSetTitleFunction() override {}
~ActionSetTitleFunction() override = default;
};

class ActionGetBadgeTextFunction : public ExtensionActionGetBadgeTextFunction {
public:
DECLARE_EXTENSION_FUNCTION("action.getBadgeText", ACTION_GETBADGETEXT)

protected:
~ActionGetBadgeTextFunction() override {}
~ActionGetBadgeTextFunction() override = default;
};

class ActionSetBadgeTextFunction : public ExtensionActionSetBadgeTextFunction {
public:
DECLARE_EXTENSION_FUNCTION("action.setBadgeText", ACTION_SETBADGETEXT)

protected:
~ActionSetBadgeTextFunction() override {}
~ActionSetBadgeTextFunction() override = default;
};

class ActionGetBadgeBackgroundColorFunction
Expand All @@ -259,7 +259,7 @@ class ActionGetBadgeBackgroundColorFunction
ACTION_GETBADGEBACKGROUNDCOLOR)

protected:
~ActionGetBadgeBackgroundColorFunction() override {}
~ActionGetBadgeBackgroundColorFunction() override = default;
};

class ActionSetBadgeBackgroundColorFunction
Expand All @@ -269,7 +269,7 @@ class ActionSetBadgeBackgroundColorFunction
ACTION_SETBADGEBACKGROUNDCOLOR)

protected:
~ActionSetBadgeBackgroundColorFunction() override {}
~ActionSetBadgeBackgroundColorFunction() override = default;
};

class ActionGetBadgeTextColorFunction : public ExtensionActionFunction {
Expand Down Expand Up @@ -297,15 +297,15 @@ class ActionEnableFunction : public ExtensionActionShowFunction {
DECLARE_EXTENSION_FUNCTION("action.enable", ACTION_ENABLE)

protected:
~ActionEnableFunction() override {}
~ActionEnableFunction() override = default;
};

class ActionDisableFunction : public ExtensionActionHideFunction {
public:
DECLARE_EXTENSION_FUNCTION("action.disable", ACTION_DISABLE)

protected:
~ActionDisableFunction() override {}
~ActionDisableFunction() override = default;
};

class ActionIsEnabledFunction : public ExtensionActionFunction {
Expand Down Expand Up @@ -350,39 +350,39 @@ class BrowserActionSetIconFunction : public ExtensionActionSetIconFunction {
DECLARE_EXTENSION_FUNCTION("browserAction.setIcon", BROWSERACTION_SETICON)

protected:
~BrowserActionSetIconFunction() override {}
~BrowserActionSetIconFunction() override = default;
};

class BrowserActionSetTitleFunction : public ExtensionActionSetTitleFunction {
public:
DECLARE_EXTENSION_FUNCTION("browserAction.setTitle", BROWSERACTION_SETTITLE)

protected:
~BrowserActionSetTitleFunction() override {}
~BrowserActionSetTitleFunction() override = default;
};

class BrowserActionSetPopupFunction : public ExtensionActionSetPopupFunction {
public:
DECLARE_EXTENSION_FUNCTION("browserAction.setPopup", BROWSERACTION_SETPOPUP)

protected:
~BrowserActionSetPopupFunction() override {}
~BrowserActionSetPopupFunction() override = default;
};

class BrowserActionGetTitleFunction : public ExtensionActionGetTitleFunction {
public:
DECLARE_EXTENSION_FUNCTION("browserAction.getTitle", BROWSERACTION_GETTITLE)

protected:
~BrowserActionGetTitleFunction() override {}
~BrowserActionGetTitleFunction() override = default;
};

class BrowserActionGetPopupFunction : public ExtensionActionGetPopupFunction {
public:
DECLARE_EXTENSION_FUNCTION("browserAction.getPopup", BROWSERACTION_GETPOPUP)

protected:
~BrowserActionGetPopupFunction() override {}
~BrowserActionGetPopupFunction() override = default;
};

class BrowserActionSetBadgeTextFunction
Expand All @@ -392,7 +392,7 @@ class BrowserActionSetBadgeTextFunction
BROWSERACTION_SETBADGETEXT)

protected:
~BrowserActionSetBadgeTextFunction() override {}
~BrowserActionSetBadgeTextFunction() override = default;
};

class BrowserActionSetBadgeBackgroundColorFunction
Expand All @@ -402,7 +402,7 @@ class BrowserActionSetBadgeBackgroundColorFunction
BROWSERACTION_SETBADGEBACKGROUNDCOLOR)

protected:
~BrowserActionSetBadgeBackgroundColorFunction() override {}
~BrowserActionSetBadgeBackgroundColorFunction() override = default;
};

class BrowserActionGetBadgeTextFunction
Expand All @@ -412,7 +412,7 @@ class BrowserActionGetBadgeTextFunction
BROWSERACTION_GETBADGETEXT)

protected:
~BrowserActionGetBadgeTextFunction() override {}
~BrowserActionGetBadgeTextFunction() override = default;
};

class BrowserActionGetBadgeBackgroundColorFunction
Expand All @@ -422,23 +422,23 @@ class BrowserActionGetBadgeBackgroundColorFunction
BROWSERACTION_GETBADGEBACKGROUNDCOLOR)

protected:
~BrowserActionGetBadgeBackgroundColorFunction() override {}
~BrowserActionGetBadgeBackgroundColorFunction() override = default;
};

class BrowserActionEnableFunction : public ExtensionActionShowFunction {
public:
DECLARE_EXTENSION_FUNCTION("browserAction.enable", BROWSERACTION_ENABLE)

protected:
~BrowserActionEnableFunction() override {}
~BrowserActionEnableFunction() override = default;
};

class BrowserActionDisableFunction : public ExtensionActionHideFunction {
public:
DECLARE_EXTENSION_FUNCTION("browserAction.disable", BROWSERACTION_DISABLE)

protected:
~BrowserActionDisableFunction() override {}
~BrowserActionDisableFunction() override = default;
};

class BrowserActionOpenPopupFunction : public ExtensionActionOpenPopupFunction {
Expand All @@ -447,7 +447,7 @@ class BrowserActionOpenPopupFunction : public ExtensionActionOpenPopupFunction {
BROWSERACTION_OPEN_POPUP)

protected:
~BrowserActionOpenPopupFunction() override {}
~BrowserActionOpenPopupFunction() override = default;
};

} // namespace extensions
Expand All @@ -461,15 +461,15 @@ class PageActionShowFunction : public extensions::ExtensionActionShowFunction {
DECLARE_EXTENSION_FUNCTION("pageAction.show", PAGEACTION_SHOW)

protected:
~PageActionShowFunction() override {}
~PageActionShowFunction() override = default;
};

class PageActionHideFunction : public extensions::ExtensionActionHideFunction {
public:
DECLARE_EXTENSION_FUNCTION("pageAction.hide", PAGEACTION_HIDE)

protected:
~PageActionHideFunction() override {}
~PageActionHideFunction() override = default;
};

class PageActionSetIconFunction
Expand All @@ -478,7 +478,7 @@ class PageActionSetIconFunction
DECLARE_EXTENSION_FUNCTION("pageAction.setIcon", PAGEACTION_SETICON)

protected:
~PageActionSetIconFunction() override {}
~PageActionSetIconFunction() override = default;
};

class PageActionSetTitleFunction
Expand All @@ -487,7 +487,7 @@ class PageActionSetTitleFunction
DECLARE_EXTENSION_FUNCTION("pageAction.setTitle", PAGEACTION_SETTITLE)

protected:
~PageActionSetTitleFunction() override {}
~PageActionSetTitleFunction() override = default;
};

class PageActionSetPopupFunction
Expand All @@ -496,7 +496,7 @@ class PageActionSetPopupFunction
DECLARE_EXTENSION_FUNCTION("pageAction.setPopup", PAGEACTION_SETPOPUP)

protected:
~PageActionSetPopupFunction() override {}
~PageActionSetPopupFunction() override = default;
};

class PageActionGetTitleFunction
Expand All @@ -505,7 +505,7 @@ class PageActionGetTitleFunction
DECLARE_EXTENSION_FUNCTION("pageAction.getTitle", PAGEACTION_GETTITLE)

protected:
~PageActionGetTitleFunction() override {}
~PageActionGetTitleFunction() override = default;
};

class PageActionGetPopupFunction
Expand All @@ -514,7 +514,7 @@ class PageActionGetPopupFunction
DECLARE_EXTENSION_FUNCTION("pageAction.getPopup", PAGEACTION_GETPOPUP)

protected:
~PageActionGetPopupFunction() override {}
~PageActionGetPopupFunction() override = default;
};

#endif // SHELL_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_ACTION_API_H_
Loading

0 comments on commit 158a87d

Please sign in to comment.