Skip to content

Commit e2de428

Browse files
Fix bitwiseOnBoolean warnings in library.cpp (#8428)
1 parent cc09988 commit e2de428

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/library.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1569,8 +1569,7 @@ bool Library::isCompliantValidationExpression(const char* p)
15691569
error |= (*(p + 1) == '-');
15701570
}
15711571
else if (*p == ':') {
1572-
// cppcheck-suppress bitwiseOnBoolean - TODO: fix this
1573-
error |= range | (*(p + 1) == '.');
1572+
error |= range || (*(p + 1) == '.');
15741573
range = true;
15751574
has_dot = false;
15761575
has_E = false;
@@ -1584,8 +1583,7 @@ bool Library::isCompliantValidationExpression(const char* p)
15841583
has_dot = false;
15851584
has_E = false;
15861585
} else if (*p == '.') {
1587-
// cppcheck-suppress bitwiseOnBoolean - TODO: fix this
1588-
error |= has_dot | (!std::isdigit(*(p + 1)));
1586+
error |= has_dot || (!std::isdigit(*(p + 1)));
15891587
has_dot = true;
15901588
} else if (*p == 'E' || *p == 'e') {
15911589
error |= has_E;

0 commit comments

Comments
 (0)