diff options
author | peter1138 <peter1138@openttd.org> | 2019-03-10 00:12:45 +0000 |
---|---|---|
committer | Charles Pigott <charlespigott@googlemail.com> | 2019-03-10 09:20:11 +0000 |
commit | fb35cb5ed2735ad22d8a2bee9df2a174994ed319 (patch) | |
tree | e8370ce0d9de9b1b3a16d248ca7e2d4a5a4e1037 | |
parent | 303cfd86a301bcd66a6fec48dec944afd2174231 (diff) | |
download | openttd-fb35cb5ed2735ad22d8a2bee9df2a174994ed319.tar.xz |
Remove: Unnecessary virtual destructors on drop down list items.
-rw-r--r-- | src/company_gui.cpp | 2 | ||||
-rw-r--r-- | src/toolbar_gui.cpp | 4 | ||||
-rw-r--r-- | src/widgets/dropdown_type.h | 3 |
3 files changed, 0 insertions, 9 deletions
diff --git a/src/company_gui.cpp b/src/company_gui.cpp index 4d5e45d50..74e1cab57 100644 --- a/src/company_gui.cpp +++ b/src/company_gui.cpp @@ -519,8 +519,6 @@ class DropDownListColourItem : public DropDownListItem { public: DropDownListColourItem(int result, bool masked) : DropDownListItem(result, masked) {} - virtual ~DropDownListColourItem() {} - StringID String() const { return this->result >= COLOUR_END ? STR_COLOUR_DEFAULT : _colour_dropdown[this->result]; diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp index e0f7b0244..69cad42ff 100644 --- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -97,8 +97,6 @@ public: this->checkmark_width = GetStringBoundingBox(STR_JUST_CHECKMARK).width + 3; } - virtual ~DropDownListCheckedItem() {} - uint Width() const { return DropDownListStringItem::Width() + this->checkmark_width; @@ -129,8 +127,6 @@ public: this->lock_size = GetSpriteSize(SPR_LOCK); } - virtual ~DropDownListCompanyItem() {} - bool Selectable() const { return true; diff --git a/src/widgets/dropdown_type.h b/src/widgets/dropdown_type.h index bc225dadf..a5fe27f64 100644 --- a/src/widgets/dropdown_type.h +++ b/src/widgets/dropdown_type.h @@ -43,7 +43,6 @@ public: StringID string; ///< String ID of item DropDownListStringItem(StringID string, int result, bool masked) : DropDownListItem(result, masked), string(string) {} - virtual ~DropDownListStringItem() {} virtual bool Selectable() const { return true; } virtual uint Width() const; @@ -61,7 +60,6 @@ public: uint64 decode_params[10]; ///< Parameters of the string DropDownListParamStringItem(StringID string, int result, bool masked) : DropDownListStringItem(string, result, masked) {} - virtual ~DropDownListParamStringItem() {} virtual StringID String() const; virtual void SetParam(uint index, uint64 value) { decode_params[index] = value; } @@ -75,7 +73,6 @@ public: const char *raw_string; DropDownListCharStringItem(const char *raw_string, int result, bool masked) : DropDownListStringItem(STR_JUST_RAW_STRING, result, masked), raw_string(raw_string) {} - virtual ~DropDownListCharStringItem() {} virtual StringID String() const; }; |