From e534f677b047909df92e63c9cad0174b435a955e Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Thu, 16 Sep 2010 10:31:20 +1000 Subject: Making methods const when they should be. --- src/Document.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Document.cxx') 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(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) -- cgit v1.2.3