diff --git a/lib/library.cpp b/lib/library.cpp index 9685e544666..e9c94456616 100644 --- a/lib/library.cpp +++ b/lib/library.cpp @@ -1569,8 +1569,7 @@ bool Library::isCompliantValidationExpression(const char* p) error |= (*(p + 1) == '-'); } else if (*p == ':') { - // cppcheck-suppress bitwiseOnBoolean - TODO: fix this - error |= range | (*(p + 1) == '.'); + error |= range || (*(p + 1) == '.'); range = true; has_dot = false; has_E = false; @@ -1584,8 +1583,7 @@ bool Library::isCompliantValidationExpression(const char* p) has_dot = false; has_E = false; } else if (*p == '.') { - // cppcheck-suppress bitwiseOnBoolean - TODO: fix this - error |= has_dot | (!std::isdigit(*(p + 1))); + error |= has_dot || (!std::isdigit(*(p + 1))); has_dot = true; } else if (*p == 'E' || *p == 'e') { error |= has_E;