diff options
author | Neil <nyamatongwe@gmail.com> | 2023-10-26 14:48:39 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2023-10-26 14:48:39 +1100 |
commit | d6d33d9460fb5fba165cbbd743b501324baa7516 (patch) | |
tree | e5ac09d5a24c3d91819899ee4d9b589ecd04a92c /src/Document.h | |
parent | 624100e7bccb2f8cc740bf9306f6eb2768fdb51d (diff) | |
download | scintilla-mirror-d6d33d9460fb5fba165cbbd743b501324baa7516.tar.gz |
Add LineStartPosition to replace common idiom LineStart(LineFromPosition(x)) as
this shortens code. LineStartPosition is also noexcept which allows callers to
be noexcept.
Diffstat (limited to 'src/Document.h')
-rw-r--r-- | src/Document.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Document.h b/src/Document.h index 8889d6454..f7f4eeedd 100644 --- a/src/Document.h +++ b/src/Document.h @@ -455,8 +455,9 @@ public: int MarkerHandleFromLine(Sci::Line line, int which) const noexcept; Sci_Position SCI_METHOD LineStart(Sci_Position line) const override; [[nodiscard]] Range LineRange(Sci::Line line) const noexcept; - bool IsLineStartPosition(Sci::Position position) const; + bool IsLineStartPosition(Sci::Position position) const noexcept; Sci_Position SCI_METHOD LineEnd(Sci_Position line) const override; + Sci::Position LineStartPosition(Sci::Position position) const noexcept; Sci::Position LineEndPosition(Sci::Position position) const noexcept; bool IsLineEndPosition(Sci::Position position) const noexcept; bool IsPositionInLineEnd(Sci::Position position) const noexcept; |