From 40048cbbc8d4c1bc862344ea2aea5ead53de4a20 Mon Sep 17 00:00:00 2001 From: Nik Chizhov Date: Sat, 6 Jul 2024 23:44:28 +0900 Subject: [PATCH] fix: remove duplicated code --- src/common/string_util.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/string_util.h b/src/common/string_util.h index 72ccfffbd..1ed7f49c8 100644 --- a/src/common/string_util.h +++ b/src/common/string_util.h @@ -181,14 +181,14 @@ inline std::optional FromChars(const std::string_view str, int base) { if (Strncasecmp("true", str.data(), str.length()) == 0 || Strncasecmp("yes", str.data(), str.length()) == 0 || Strncasecmp("on", str.data(), str.length()) == 0 || Strncasecmp("1", str.data(), str.length()) == 0 || - Strncasecmp("enabled", str.data(), str.length()) == 0 || Strncasecmp("1", str.data(), str.length()) == 0) + Strncasecmp("enabled", str.data(), str.length()) == 0) { return true; } if (Strncasecmp("false", str.data(), str.length()) == 0 || Strncasecmp("no", str.data(), str.length()) == 0 || Strncasecmp("off", str.data(), str.length()) == 0 || Strncasecmp("0", str.data(), str.length()) == 0 || - Strncasecmp("disabled", str.data(), str.length()) == 0 || Strncasecmp("0", str.data(), str.length()) == 0) + Strncasecmp("disabled", str.data(), str.length()) == 0) { return false; }