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 | |
| parent | 44759e200fbab494d6b7ce25a15dde3db05bc1bc (diff) | |
| download | scintilla-mirror-58053e3f7114cf1295973b160d6b7e6ebcb2dfae.tar.gz | |
Making methods const when they should be.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Document.cxx | 4 | ||||
| -rw-r--r-- | src/Document.h | 4 | 
2 files changed, 4 insertions, 4 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) diff --git a/src/Document.h b/src/Document.h index c7ff8e069..d58c5efe5 100644 --- a/src/Document.h +++ b/src/Document.h @@ -228,9 +228,9 @@ public:  	int ClampPositionIntoDocument(int pos);  	bool IsCrLf(int pos);  	int LenChar(int pos); -	bool InGoodUTF8(int pos, int &start, int &end); +	bool InGoodUTF8(int pos, int &start, int &end) const;  	int MovePositionOutsideChar(int pos, int moveDir, bool checkLineEnd=true); -	int NextPosition(int pos, int moveDir); +	int NextPosition(int pos, int moveDir) const;  	bool NextCharacter(int &pos, int moveDir);	// Returns true if pos changed  	int SCI_METHOD CodePage() const;  	bool SCI_METHOD IsDBCSLeadByte(char ch) const;  | 
