From 31b76af68badad3cb5d65b435b27760d65a9767a Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 6 Apr 2017 21:04:52 +1000 Subject: Added const to some lexers. --- lexers/LexErrorList.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lexers/LexErrorList.cxx') diff --git a/lexers/LexErrorList.cxx b/lexers/LexErrorList.cxx index b1b99c503..871902a88 100644 --- a/lexers/LexErrorList.cxx +++ b/lexers/LexErrorList.cxx @@ -142,7 +142,7 @@ static int RecogniseErrorListLine(const char *lineBuffer, Sci_PositionU lengthLi // CTags: \t\t // Lua 5 traceback: \t:: // Lua 5.1: : :: - bool initialTab = (lineBuffer[0] == '\t'); + const bool initialTab = (lineBuffer[0] == '\t'); bool initialColonPart = false; bool canBeCtags = !initialTab; // For ctags must have an identifier with no spaces then a tab enum { stInitial, @@ -152,7 +152,7 @@ static int RecogniseErrorListLine(const char *lineBuffer, Sci_PositionU lengthLi stUnrecognized } state = stInitial; for (Sci_PositionU i = 0; i < lengthLine; i++) { - char ch = lineBuffer[i]; + const char ch = lineBuffer[i]; char chNext = ' '; if ((i + 1) < lengthLine) chNext = lineBuffer[i + 1]; @@ -367,7 +367,7 @@ static void ColouriseErrorListDoc(Sci_PositionU startPos, Sci_Position length, i // diagnostics, style the path and line number separately from the rest of the // line with style 21 used for the rest of the line. // This allows matched text to be more easily distinguished from its location. - bool valueSeparate = styler.GetPropertyInt("lexer.errorlist.value.separate", 0) != 0; + const bool valueSeparate = styler.GetPropertyInt("lexer.errorlist.value.separate", 0) != 0; // property lexer.errorlist.escape.sequences // Set to 1 to interpret escape sequences. -- cgit v1.2.3