From cda15af9657880e91ccf65603e109b202d9e78bf Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 6 Apr 2017 21:04:37 +1000 Subject: Added const where possible. --- lexlib/Accessor.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lexlib/Accessor.cxx') diff --git a/lexlib/Accessor.cxx b/lexlib/Accessor.cxx index e35894dd3..2e51fa32a 100644 --- a/lexlib/Accessor.cxx +++ b/lexlib/Accessor.cxx @@ -29,7 +29,7 @@ int Accessor::GetPropertyInt(const char *key, int defaultValue) const { } int Accessor::IndentAmount(Sci_Position line, int *flags, PFNIsCommentLeader pfnIsCommentLeader) { - Sci_Position end = Length(); + const Sci_Position end = Length(); int spaceFlags = 0; // Determines the indentation level of the current line and also checks for consistent @@ -44,7 +44,7 @@ int Accessor::IndentAmount(Sci_Position line, int *flags, PFNIsCommentLeader pfn Sci_Position posPrev = inPrevPrefix ? LineStart(line-1) : 0; while ((ch == ' ' || ch == '\t') && (pos < end)) { if (inPrevPrefix) { - char chPrev = (*this)[posPrev++]; + const char chPrev = (*this)[posPrev++]; if (chPrev == ' ' || chPrev == '\t') { if (chPrev != ch) spaceFlags |= wsInconsistent; -- cgit v1.2.3