sonar recommendations

This commit is contained in:
proddy
2022-03-05 16:21:00 +01:00
parent 10830dee36
commit d09e2237ee
20 changed files with 51 additions and 120 deletions

View File

@@ -587,12 +587,12 @@ bool Helpers::value2bool(const char * v, bool & value) {
std::string bool_str = toLower(v); // convert to lower case
if ((bool_str == read_flash_string(F_(on))) || (bool_str == "1") or (bool_str == "true")) {
if ((bool_str == read_flash_string(F_(on))) || (bool_str == "1") || (bool_str == "true")) {
value = true;
return true; // is a bool
}
if ((bool_str == read_flash_string(F_(off))) || (bool_str == "0") or (bool_str == "false")) {
if ((bool_str == read_flash_string(F_(off))) || (bool_str == "0") || (bool_str == "false")) {
value = false;
return true; // is a bool
}