diff options
author | Neil <nyamatongwe@gmail.com> | 2018-03-01 11:03:37 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2018-03-01 11:03:37 +1100 |
commit | 1b808ad6a4e623c564513a72cedc17581426942f (patch) | |
tree | f0671c60ec9680f4c4d2e9f7e8c85028b833b0cf /src/Selection.cxx | |
parent | 13f7cab5a5894313d2245ae56d6f2e7b1f0d7307 (diff) | |
download | scintilla-mirror-1b808ad6a4e623c564513a72cedc17581426942f.tar.gz |
Backport: Mark variables as const where simple.
Backport of changeset 6470:d78a4b522662.
Diffstat (limited to 'src/Selection.cxx')
-rw-r--r-- | src/Selection.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Selection.cxx b/src/Selection.cxx index 2e2680ad8..a45adcf51 100644 --- a/src/Selection.cxx +++ b/src/Selection.cxx @@ -23,7 +23,7 @@ using namespace Scintilla; void SelectionPosition::MoveForInsertDelete(bool insertion, Sci::Position startChange, Sci::Position length) { if (insertion) { if (position == startChange) { - Sci::Position virtualLengthRemove = std::min(length, virtualSpace); + const Sci::Position virtualLengthRemove = std::min(length, virtualSpace); virtualSpace -= virtualLengthRemove; position += virtualLengthRemove; } else if (position > startChange) { @@ -108,7 +108,7 @@ bool SelectionRange::ContainsCharacter(Sci::Position posCharacter) const { } SelectionSegment SelectionRange::Intersect(SelectionSegment check) const { - SelectionSegment inOrder(caret, anchor); + const SelectionSegment inOrder(caret, anchor); if ((inOrder.start <= check.end) || (inOrder.end >= check.start)) { SelectionSegment portion = check; if (portion.start < inOrder.start) |