aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/Editor.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 89f248dbe..fd0f8b8c4 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -801,9 +801,7 @@ void Editor::MultipleSelectAdd(AddNumber addNumber) {
bool Editor::RangeContainsProtected(Sci::Position start, Sci::Position end) const noexcept {
if (vs.ProtectionActive()) {
if (start > end) {
- const Sci::Position t = start;
- start = end;
- end = t;
+ std::swap(start, end);
}
for (Sci::Position pos = start; pos < end; pos++) {
if (vs.styles[pdoc->StyleIndexAt(pos)].IsProtected())