From 406ddc5c1094f7f8c1e58f36c3528ab389fb4002 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 30 Sep 2017 23:05:42 +0200 Subject: [PATCH] cleanup dead code, spotted by dmitry-me! --- lib/utils.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/utils.h b/lib/utils.h index d6bc1b26b..0daa6d7c5 100644 --- a/lib/utils.h +++ b/lib/utils.h @@ -82,12 +82,12 @@ inline static const char *getOrdinalText(int i) inline static int caseInsensitiveStringCompare(const std::string &lhs, const std::string &rhs) { if (lhs.size() != rhs.size()) - return (lhs.size() < rhs.size()) ? -1 : ((lhs.size() == rhs.size()) ? 0 : 1); + return (lhs.size() < rhs.size()) ? -1 : 1; for (unsigned int i = 0; i < lhs.size(); ++i) { int c1 = std::toupper(lhs[i]); int c2 = std::toupper(rhs[i]); if (c1 != c2) - return (c1 < c2) ? -1 : ((c1 == c2) ? 0 : 1); + return (c1 < c2) ? -1 : 1; } return 0; }