Skip to content

Commit 543cf89

Browse files
authored
Merge pull request #965 from orbitcowboy/master
Improved const correctness of local variables.
2 parents 406ddc5 + d9ef5c5 commit 543cf89

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/utils.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ inline static int caseInsensitiveStringCompare(const std::string &lhs, const std
8484
if (lhs.size() != rhs.size())
8585
return (lhs.size() < rhs.size()) ? -1 : 1;
8686
for (unsigned int i = 0; i < lhs.size(); ++i) {
87-
int c1 = std::toupper(lhs[i]);
88-
int c2 = std::toupper(rhs[i]);
87+
const int c1 = std::toupper(lhs[i]);
88+
const int c2 = std::toupper(rhs[i]);
8989
if (c1 != c2)
9090
return (c1 < c2) ? -1 : 1;
9191
}

0 commit comments

Comments
 (0)