From d80d7ebf05c2b2a969707b9d9ba40b377fdf9f55 Mon Sep 17 00:00:00 2001 From: Zufu Liu Date: Tue, 3 Dec 2024 08:51:54 +1100 Subject: Feature [feature-requests:#1537]. Avoid holding onto Document without need. --- src/Document.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/Document.cxx b/src/Document.cxx index d30cb50cf..04e1ac9b7 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -2900,14 +2900,13 @@ namespace { */ class RESearchRange { public: - const Document *doc; int increment; Sci::Position startPos; Sci::Position endPos; Sci::Line lineRangeStart; Sci::Line lineRangeEnd; Sci::Line lineRangeBreak; - RESearchRange(const Document *doc_, Sci::Position minPos, Sci::Position maxPos) noexcept : doc(doc_) { + RESearchRange(const Document *doc, Sci::Position minPos, Sci::Position maxPos) noexcept { increment = (minPos <= maxPos) ? 1 : -1; // Range endpoints should not be inside DBCS characters or between a CR and LF, -- cgit v1.2.3