mirror of
https://github.com/ScintillaOrg/lexilla.git
synced 2025-05-08 19:06:45 +08:00
Silence warnings by initializing and removing unnecessary else.
This commit is contained in:
parent
361b5e8744
commit
06da12b0b3
@ -164,7 +164,7 @@ bool IsCommentLine(Sci_Position line, LexAccessor &styler) {
|
||||
const char ch = styler[i];
|
||||
if (ch == '#')
|
||||
return true;
|
||||
else if (ch != ' ' && ch != '\t')
|
||||
if (ch != ' ' && ch != '\t')
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
@ -698,7 +698,7 @@ void SCI_METHOD LexerBash::Lex(Sci_PositionU startPos, Sci_Position length, int
|
||||
identifierStyle = subStyle | insideCommand;
|
||||
}
|
||||
// allow keywords ending in a whitespace, meta character or command delimiter
|
||||
char s2[10];
|
||||
char s2[10]{};
|
||||
s2[0] = static_cast<char>(sc.ch);
|
||||
s2[1] = '\0';
|
||||
const bool keywordEnds = IsASpace(sc.ch) || setMetaCharacter.Contains(sc.ch) || cmdDelimiter.InList(s2);
|
||||
@ -1140,7 +1140,7 @@ void SCI_METHOD LexerBash::Lex(Sci_PositionU startPos, Sci_Position length, int
|
||||
}
|
||||
// handle command delimiters in command Start|Body|Word state, also Test if 'test' or '[]'
|
||||
if (cmdState < CmdState::DoubleBracket) {
|
||||
char s[10];
|
||||
char s[10]{};
|
||||
s[0] = static_cast<char>(sc.ch);
|
||||
if (setBashOperator.Contains(sc.chNext)) {
|
||||
s[1] = static_cast<char>(sc.chNext);
|
||||
|
Loading…
x
Reference in New Issue
Block a user