aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2021-05-05 15:13:51 +1000
committerNeil <nyamatongwe@gmail.com>2021-05-05 15:13:51 +1000
commit070f6e7b5fccfb11d27a86601f3f4ed086cc48b3 (patch)
treec7e035673ce2f8d49656231ae1309e0e1c770eef /src
parentf35a4835be4888005f19dd8fbd638ff209bb77fc (diff)
downloadscintilla-mirror-070f6e7b5fccfb11d27a86601f3f4ed086cc48b3.tar.gz
Avoid some warnings in ResetLineEnds.
Diffstat (limited to 'src')
-rw-r--r--src/CellBuffer.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/CellBuffer.cxx b/src/CellBuffer.cxx
index 767a0c30d..6d760cdb5 100644
--- a/src/CellBuffer.cxx
+++ b/src/CellBuffer.cxx
@@ -887,11 +887,11 @@ void CellBuffer::ResetLineEnds() {
// Reinitialize line data -- too much work to preserve
plv->Init();
- const Sci::Position position = 0;
+ constexpr Sci::Position position = 0;
const Sci::Position length = Length();
+ plv->InsertText(0, length);
Sci::Line lineInsert = 1;
- const bool atLineStart = true;
- plv->InsertText(lineInsert-1, length);
+ constexpr bool atLineStart = true;
unsigned char chBeforePrev = 0;
unsigned char chPrev = 0;
for (Sci::Position i = 0; i < length; i++) {