From 190e7c5a66f6e3bfa633d0a4705f96312d385013 Mon Sep 17 00:00:00 2001 From: Neil Date: Sat, 29 Feb 2020 09:11:59 +1100 Subject: Backport: Add const and noexcept where they make sense. Backport of changeset 7991:d7d83db0457a. --- src/Editor.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Editor.cxx') diff --git a/src/Editor.cxx b/src/Editor.cxx index 5bbc55969..fb3aae6a1 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -561,7 +561,7 @@ Sci::Position Editor::CurrentPosition() const { return sel.MainCaret(); } -bool Editor::SelectionEmpty() const { +bool Editor::SelectionEmpty() const noexcept { return sel.Empty(); } @@ -785,7 +785,7 @@ void Editor::MultipleSelectAdd(AddNumber addNumber) { } } -bool Editor::RangeContainsProtected(Sci::Position start, Sci::Position end) const { +bool Editor::RangeContainsProtected(Sci::Position start, Sci::Position end) const noexcept { if (vs.ProtectionActive()) { if (start > end) { const Sci::Position t = start; @@ -800,7 +800,7 @@ bool Editor::RangeContainsProtected(Sci::Position start, Sci::Position end) cons return false; } -bool Editor::SelectionContainsProtected() { +bool Editor::SelectionContainsProtected() const { for (size_t r=0; r::reverse_iterator rit = selPtrs.rbegin(); -- cgit v1.2.3