aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Selection.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2018-03-01 11:03:37 +1100
committerNeil <nyamatongwe@gmail.com>2018-03-01 11:03:37 +1100
commitae4b1d41a3e763240a5e9f60f76cedab55e1e5e2 (patch)
treeb201f21a3c0bcae634b8633c1c3d8ea704529b46 /src/Selection.cxx
parent5b88f2c8d74cdeab860dc8a009428f9474bc2c8b (diff)
downloadscintilla-mirror-ae4b1d41a3e763240a5e9f60f76cedab55e1e5e2.tar.gz
Mark variables as const where simple.
Diffstat (limited to 'src/Selection.cxx')
-rw-r--r--src/Selection.cxx4
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)