From f0e6ea3f244af47843a5c2d42066054467771685 Mon Sep 17 00:00:00 2001 From: Neil Date: Sat, 28 Aug 2021 09:42:05 +1000 Subject: Follow rule-of-zero by removing unnecessary destructors. --- src/Decoration.cxx | 6 ------ src/Selection.cxx | 3 --- src/Selection.h | 1 - 3 files changed, 10 deletions(-) diff --git a/src/Decoration.cxx b/src/Decoration.cxx index 163347ce9..a26eecd1c 100644 --- a/src/Decoration.cxx +++ b/src/Decoration.cxx @@ -88,7 +88,6 @@ class DecorationList : public IDecorationList { public: DecorationList(); - ~DecorationList() override; const std::vector &View() const noexcept override { return decorationView; @@ -126,11 +125,6 @@ DecorationList::DecorationList() : currentIndicator(0), currentValue(1), cu lengthDocument(0), clickNotified(false) { } -template -DecorationList::~DecorationList() { - current = nullptr; -} - template Decoration *DecorationList::DecorationFromIndicator(int indicator) noexcept { for (const std::unique_ptr> &deco : decorationList) { diff --git a/src/Selection.cxx b/src/Selection.cxx index 9cf4e6f09..fbdc474eb 100644 --- a/src/Selection.cxx +++ b/src/Selection.cxx @@ -194,9 +194,6 @@ Selection::Selection() : mainRange(0), moveExtends(false), tentativeMain(false), AddSelection(SelectionRange(SelectionPosition(0))); } -Selection::~Selection() { -} - bool Selection::IsRectangular() const noexcept { return (selType == SelTypes::rectangle) || (selType == SelTypes::thin); } diff --git a/src/Selection.h b/src/Selection.h index 7912d03e5..2e554f999 100644 --- a/src/Selection.h +++ b/src/Selection.h @@ -148,7 +148,6 @@ public: SelTypes selType; Selection(); - ~Selection(); bool IsRectangular() const noexcept; Sci::Position MainCaret() const noexcept; Sci::Position MainAnchor() const noexcept; -- cgit v1.2.3