From a975005246dc972de1e61d866fd4dfe617c89ab2 Mon Sep 17 00:00:00 2001 From: Neil Date: Fri, 1 Nov 2019 12:40:13 +1100 Subject: Avoid calling vector::shrink_to_fit in destructors as it is not noexcept. The destructors of the members will ensure that everything is correct. Potential unhandled exceptions reported by Coverity. --- src/CellBuffer.cxx | 1 - src/PerLine.cxx | 3 --- 2 files changed, 4 deletions(-) diff --git a/src/CellBuffer.cxx b/src/CellBuffer.cxx index 815ac3110..80dc02d64 100644 --- a/src/CellBuffer.cxx +++ b/src/CellBuffer.cxx @@ -99,7 +99,6 @@ public: void operator=(const LineStartIndex &) = delete; void operator=(LineStartIndex &&) = delete; virtual ~LineStartIndex() { - starts.DeleteAll(); } bool Allocate(Sci::Line lines) { refCount++; diff --git a/src/PerLine.cxx b/src/PerLine.cxx index 4a313d292..ed5e463d6 100644 --- a/src/PerLine.cxx +++ b/src/PerLine.cxx @@ -81,7 +81,6 @@ void MarkerHandleSet::CombineWith(MarkerHandleSet *other) { } LineMarkers::~LineMarkers() { - markers.DeleteAll(); } void LineMarkers::Init() { @@ -311,7 +310,6 @@ struct AnnotationHeader { }; LineAnnotation::~LineAnnotation() { - ClearAll(); } void LineAnnotation::Init() { @@ -433,7 +431,6 @@ int LineAnnotation::Lines(Sci::Line line) const { } LineTabstops::~LineTabstops() { - tabstops.DeleteAll(); } void LineTabstops::Init() { -- cgit v1.2.3