From 8f42bb51d6445602027d8c68d6c6f225f6536c68 Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 26 Oct 2023 13:44:13 +1100 Subject: Implement LineEnd method in CellBuffer as it is a basic function and only uses CellBuffer fields. Declare LineEnd noexcept as it should never throw and that allows methods calling it to also be noexcept. Call LineEndPosition to simplify Editor::LineSelectionRange. --- src/Document.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Document.h') diff --git a/src/Document.h b/src/Document.h index 72ed532b3..8889d6454 100644 --- a/src/Document.h +++ b/src/Document.h @@ -457,9 +457,9 @@ public: [[nodiscard]] Range LineRange(Sci::Line line) const noexcept; bool IsLineStartPosition(Sci::Position position) const; Sci_Position SCI_METHOD LineEnd(Sci_Position line) const override; - Sci::Position LineEndPosition(Sci::Position position) const; - bool IsLineEndPosition(Sci::Position position) const; - bool IsPositionInLineEnd(Sci::Position position) const; + Sci::Position LineEndPosition(Sci::Position position) const noexcept; + bool IsLineEndPosition(Sci::Position position) const noexcept; + bool IsPositionInLineEnd(Sci::Position position) const noexcept; Sci::Position VCHomePosition(Sci::Position position) const; Sci::Position IndexLineStart(Sci::Line line, Scintilla::LineCharacterIndexType lineCharacterIndex) const noexcept; Sci::Line LineFromPositionIndex(Sci::Position pos, Scintilla::LineCharacterIndexType lineCharacterIndex) const noexcept; -- cgit v1.2.3