From 1714b86c9695f7c97e178deacfebb52c3249efb4 Mon Sep 17 00:00:00 2001 From: chrchr-github <78114321+chrchr-github@users.noreply.github.com> Date: Thu, 9 Apr 2026 08:57:13 +0200 Subject: [PATCH] Fix bitwiseOnBoolean warnings in library.cpp --- lib/library.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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;