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 | ae4b1d41a3e763240a5e9f60f76cedab55e1e5e2 (patch) | |
tree | b201f21a3c0bcae634b8633c1c3d8ea704529b46 /src/CellBuffer.cxx | |
parent | 5b88f2c8d74cdeab860dc8a009428f9474bc2c8b (diff) | |
download | scintilla-mirror-ae4b1d41a3e763240a5e9f60f76cedab55e1e5e2.tar.gz |
Mark variables as const where simple.
Diffstat (limited to 'src/CellBuffer.cxx')
-rw-r--r-- | src/CellBuffer.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/CellBuffer.cxx b/src/CellBuffer.cxx index b4a4029f6..744b62967 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); |