Cosmetics: Having cppcheck pleased

(...) remove_comments.cc,62,style,knownConditionTrueFalse,Condition 'incomment==0' is always true
(...) remove_comments.cc,66,style,knownConditionTrueFalse,Condition 'incomment==0' is always true
(...) remove_comments.cc,69,style,knownConditionTrueFalse,Condition 'incomment==0' is always true
This commit is contained in:
Felipe Zimmerle 2021-05-10 11:17:45 -03:00
parent 66ba7b065a
commit 6fdba42c02

View File

@ -59,14 +59,14 @@ std::string RemoveComments::evaluate(const std::string &value,
} else if ((input[i] == '<') && (i + 1 < input_len) } else if ((input[i] == '<') && (i + 1 < input_len)
&& (input[i + 1] == '!') && (i + 2 < input_len) && (input[i + 1] == '!') && (i + 2 < input_len)
&& (input[i+2] == '-') && (i + 3 < input_len) && (input[i+2] == '-') && (i + 3 < input_len)
&& (input[i + 3] == '-') && (incomment == 0)) { && (input[i + 3] == '-')) {
incomment = 1; incomment = 1;
i += 4; i += 4;
} else if ((input[i] == '-') && (i + 1 < input_len) } else if ((input[i] == '-') && (i + 1 < input_len)
&& (input[i + 1] == '-') && (incomment == 0)) { && (input[i + 1] == '-')) {
input[i] = ' '; input[i] = ' ';
break; break;
} else if (input[i] == '#' && (incomment == 0)) { } else if (input[i] == '#') {
input[i] = ' '; input[i] = ' ';
break; break;
} else { } else {