We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9ce2320 commit 406ddc5Copy full SHA for 406ddc5
1 file changed
lib/utils.h
@@ -82,12 +82,12 @@ inline static const char *getOrdinalText(int i)
82
inline static int caseInsensitiveStringCompare(const std::string &lhs, const std::string &rhs)
83
{
84
if (lhs.size() != rhs.size())
85
- return (lhs.size() < rhs.size()) ? -1 : ((lhs.size() == rhs.size()) ? 0 : 1);
+ return (lhs.size() < rhs.size()) ? -1 : 1;
86
for (unsigned int i = 0; i < lhs.size(); ++i) {
87
int c1 = std::toupper(lhs[i]);
88
int c2 = std::toupper(rhs[i]);
89
if (c1 != c2)
90
- return (c1 < c2) ? -1 : ((c1 == c2) ? 0 : 1);
+ return (c1 < c2) ? -1 : 1;
91
}
92
return 0;
93
0 commit comments