From 1b808ad6a4e623c564513a72cedc17581426942f Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 1 Mar 2018 11:03:37 +1100 Subject: Backport: Mark variables as const where simple. Backport of changeset 6470:d78a4b522662. --- src/CellBuffer.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/CellBuffer.cxx') diff --git a/src/CellBuffer.cxx b/src/CellBuffer.cxx index 513c9a9b8..f9a4075be 100644 --- a/src/CellBuffer.cxx +++ b/src/CellBuffer.cxx @@ -577,10 +577,10 @@ void CellBuffer::ResetLineEnds() { // Reinitialize line data -- too much work to preserve lv.Init(); - Sci::Position position = 0; - Sci::Position length = Length(); + const Sci::Position position = 0; + const Sci::Position length = Length(); Sci::Line lineInsert = 1; - bool atLineStart = true; + const bool atLineStart = true; lv.InsertText(lineInsert-1, length); unsigned char chBeforePrev = 0; unsigned char chPrev = 0; @@ -626,7 +626,7 @@ void CellBuffer::BasicInsertString(Sci::Position position, const char *s, Sci::P } Sci::Line lineInsert = lv.LineFromPosition(position) + 1; - bool atLineStart = lv.LineStart(lineInsert-1) == position; + const bool atLineStart = lv.LineStart(lineInsert-1) == position; // Point all the lines after the insertion point further along in the buffer lv.InsertText(lineInsert-1, insertLength); unsigned char chBeforePrev = substance.ValueAt(position - 2); -- cgit v1.2.3