Skip to content

Commit 6fdba42

Browse files
committed
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
1 parent 66ba7b0 commit 6fdba42

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/actions/transformations/remove_comments.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@ std::string RemoveComments::evaluate(const std::string &value,
5959
} else if ((input[i] == '<') && (i + 1 < input_len)
6060
&& (input[i + 1] == '!') && (i + 2 < input_len)
6161
&& (input[i+2] == '-') && (i + 3 < input_len)
62-
&& (input[i + 3] == '-') && (incomment == 0)) {
62+
&& (input[i + 3] == '-')) {
6363
incomment = 1;
6464
i += 4;
6565
} else if ((input[i] == '-') && (i + 1 < input_len)
66-
&& (input[i + 1] == '-') && (incomment == 0)) {
66+
&& (input[i + 1] == '-')) {
6767
input[i] = ' ';
6868
break;
69-
} else if (input[i] == '#' && (incomment == 0)) {
69+
} else if (input[i] == '#') {
7070
input[i] = ' ';
7171
break;
7272
} else {

0 commit comments

Comments
 (0)