diff options
author | nyamatongwe <devnull@localhost> | 2010-09-16 10:31:20 +1000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2010-09-16 10:31:20 +1000 |
commit | e534f677b047909df92e63c9cad0174b435a955e (patch) | |
tree | 9d7327244a8466b64c1c4738ca1f2f2462f1add1 /src/Document.cxx | |
parent | 445d15200d654c4f961d80f112738ec46a05ffa7 (diff) | |
download | scintilla-mirror-e534f677b047909df92e63c9cad0174b435a955e.tar.gz |
Making methods const when they should be.
Diffstat (limited to 'src/Document.cxx')
-rw-r--r-- | src/Document.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Document.cxx b/src/Document.cxx index 5bf9adbe4..8ebd407d8 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -416,7 +416,7 @@ static int BytesFromLead(int leadByte) { return 0; } -bool Document::InGoodUTF8(int pos, int &start, int &end) { +bool Document::InGoodUTF8(int pos, int &start, int &end) const { int lead = pos; while ((lead>0) && (pos-lead < 4) && IsTrailByte(static_cast<unsigned char>(cb.CharAt(lead-1)))) lead--; @@ -515,7 +515,7 @@ int Document::MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd) { // NextPosition moves between valid positions - it can not handle a position in the middle of a // multi-byte character. It is used to iterate through text more efficiently than MovePositionOutsideChar. // A \r\n pair is treated as two characters. -int Document::NextPosition(int pos, int moveDir) { +int Document::NextPosition(int pos, int moveDir) const { // If out of range, just return minimum/maximum value. int increment = (moveDir > 0) ? 1 : -1; if (pos + increment <= 0) |