diff options
author | nyamatongwe <unknown> | 2010-09-16 10:31:20 +1000 |
---|---|---|
committer | nyamatongwe <unknown> | 2010-09-16 10:31:20 +1000 |
commit | 58053e3f7114cf1295973b160d6b7e6ebcb2dfae (patch) | |
tree | 4523cf59cbfc601dc3dc481313c3e36b3707dee6 /src/Document.cxx | |
parent | 44759e200fbab494d6b7ce25a15dde3db05bc1bc (diff) | |
download | scintilla-mirror-58053e3f7114cf1295973b160d6b7e6ebcb2dfae.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) |